Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fairblue
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hosting
chat
fairblue
Commits
fc1b06c3
Commit
fc1b06c3
authored
4 years ago
by
Joao Siebel
Browse files
Options
Downloads
Patches
Plain Diff
Add try/catch in custom send function
parent
5d95e5ca
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bigbluebutton-html5/imports/startup/server/index.js
+16
-9
16 additions, 9 deletions
bigbluebutton-html5/imports/startup/server/index.js
with
16 additions
and
9 deletions
bigbluebutton-html5/imports/startup/server/index.js
+
16
−
9
View file @
fc1b06c3
...
...
@@ -66,17 +66,24 @@ Meteor.startup(() => {
// https://github.com/davhani/hagty/blob/6a5c78e9ae5a5e4ade03e747fb4cc8ea2df4be0c/faye-websocket/lib/faye/websocket/api.js#L84-L88
const
newSend
=
function
send
(
data
)
{
this
.
lastSentFrameTimestamp
=
new
Date
().
getTime
();
try
{
this
.
lastSentFrameTimestamp
=
new
Date
().
getTime
();
if
(
this
.
meteorHeartbeat
)
{
// Call https://github.com/meteor/meteor/blob/1e7e56eec8414093cd0c1c70750b894069fc972a/packages/ddp-common/heartbeat.js#L80-L88
this
.
meteorHeartbeat
.
_seenPacket
=
true
;
if
(
this
.
meteorHeartbeat
.
_heartbeatTimeoutHandle
)
{
this
.
meteorHeartbeat
.
_clearHeartbeatTimeoutTimer
();
}
}
// Call https://github.com/meteor/meteor/blob/1e7e56eec8414093cd0c1c70750b894069fc972a/packages/ddp-common/heartbeat.js#L80-L88
this
.
meteorHeartbeat
.
_seenPacket
=
true
;
if
(
this
.
meteorHeartbeat
.
_heartbeatTimeoutHandle
)
{
this
.
meteorHeartbeat
.
_clearHeartbeatTimeoutTimer
();
if
(
this
.
readyState
>
1
/* API.OPEN = 1 */
)
return
false
;
if
(
!
(
data
instanceof
Buffer
))
data
=
String
(
data
);
return
this
.
_driver
.
messages
.
write
(
data
);
}
catch
(
err
)
{
console
.
error
(
'
Error on send data
'
,
err
);
return
false
;
}
if
(
this
.
readyState
>
1
/* API.OPEN = 1 */
)
return
false
;
if
(
!
(
data
instanceof
Buffer
))
data
=
String
(
data
);
return
this
.
_driver
.
messages
.
write
(
data
);
};
Meteor
.
setInterval
(()
=>
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment