mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge remote-tracking branch 'origin/bg-avoid-emit-when-client-not-connected' into spd-trycatch-all-the-things
This commit is contained in:
commit
9fd4699098
1 changed files with 3 additions and 0 deletions
|
@ -99,6 +99,9 @@ module.exports = WebsocketLoadBalancer =
|
||||||
, (client, cb) ->
|
, (client, cb) ->
|
||||||
Utils.getClientAttributes client, ['is_restricted_user'], (err, {is_restricted_user}) ->
|
Utils.getClientAttributes client, ['is_restricted_user'], (err, {is_restricted_user}) ->
|
||||||
return cb(err) if err?
|
return cb(err) if err?
|
||||||
|
if client.disconnected
|
||||||
|
logger.warn {channel:channel, client: client.id}, "skipping emit, client not connected"
|
||||||
|
return cb()
|
||||||
if !seen[client.id]
|
if !seen[client.id]
|
||||||
seen[client.id] = true
|
seen[client.id] = true
|
||||||
if !(is_restricted_user && message.message not in RESTRICTED_USER_MESSAGE_TYPE_PASS_LIST)
|
if !(is_restricted_user && message.message not in RESTRICTED_USER_MESSAGE_TYPE_PASS_LIST)
|
||||||
|
|
Loading…
Reference in a new issue