mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-27 17:53:07 +00:00
Make breakout logic after draining N clients more clear
This commit is contained in:
parent
7107d9adcd
commit
6fa2a81baf
1 changed files with 2 additions and 1 deletions
|
@ -19,7 +19,8 @@ module.exports =
|
||||||
logger.log {client_id: client.id}, "Asking client to reconnect gracefully"
|
logger.log {client_id: client.id}, "Asking client to reconnect gracefully"
|
||||||
client.emit "reconnectGracefully"
|
client.emit "reconnectGracefully"
|
||||||
drainedCount++
|
drainedCount++
|
||||||
if drainedCount == N
|
haveDrainedNClients = (drainedCount == N)
|
||||||
|
if haveDrainedNClients
|
||||||
break
|
break
|
||||||
if drainedCount < N
|
if drainedCount < N
|
||||||
logger.log "All clients have been told to reconnectGracefully"
|
logger.log "All clients have been told to reconnectGracefully"
|
Loading…
Reference in a new issue