Merge pull request #48 from sharelatex/bg-fix-close-app-shutdown

fix beginShutdown to use server.close()
This commit is contained in:
Brian Gough 2019-03-20 13:40:06 +00:00 committed by GitHub
commit 74f26a5fa9

View file

@ -117,7 +117,7 @@ beginShutdown = () ->
process.exit 1 process.exit 1
, 120*1000 , 120*1000
killTimer.unref?() # prevent timer from keeping process alive killTimer.unref?() # prevent timer from keeping process alive
app.close () -> server.close () ->
logger.log "closed all connections" logger.log "closed all connections"
Metrics.close() Metrics.close()
process.disconnect?() process.disconnect?()
@ -128,7 +128,7 @@ port = settings.internal.filestore.port or 3009
host = "0.0.0.0" host = "0.0.0.0"
if !module.parent # Called directly if !module.parent # Called directly
app.listen port, host, (error) -> server = app.listen port, host, (error) ->
logger.info "Filestore starting up, listening on #{host}:#{port}" logger.info "Filestore starting up, listening on #{host}:#{port}"