mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Make breakout logic after draining N clients more clear
This commit is contained in:
@@ -19,7 +19,8 @@ module.exports =
|
||||
logger.log {client_id: client.id}, "Asking client to reconnect gracefully"
|
||||
client.emit "reconnectGracefully"
|
||||
drainedCount++
|
||||
if drainedCount == N
|
||||
haveDrainedNClients = (drainedCount == N)
|
||||
if haveDrainedNClients
|
||||
break
|
||||
if drainedCount < N
|
||||
logger.log "All clients have been told to reconnectGracefully"
|
||||
Reference in New Issue
Block a user