mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
make sure shutdown only happens once
This commit is contained in:
@@ -113,9 +113,10 @@ port = settings.internal.filestore.port or 3009
|
||||
host = settings.internal.filestore.host or "localhost"
|
||||
|
||||
beginShutdown = () ->
|
||||
appIsOk = false
|
||||
server.close()
|
||||
logger.log "server will stop accepting connections"
|
||||
if appIsOk
|
||||
appIsOk = false
|
||||
server.close()
|
||||
logger.log "server will stop accepting connections"
|
||||
|
||||
server.on "close", () ->
|
||||
logger.log "closed all connections"
|
||||
|
||||
Reference in New Issue
Block a user