mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
pass the signal correctly to the shutdown handler
This commit is contained in:
parent
1fc8cc44c3
commit
e263d37476
1 changed files with 1 additions and 2 deletions
|
@ -135,8 +135,7 @@ if Settings.shutdownDrainTimeWindow?
|
||||||
shutdownDrainTimeWindow = parseInt(Settings.shutdownDrainTimeWindow, 10)
|
shutdownDrainTimeWindow = parseInt(Settings.shutdownDrainTimeWindow, 10)
|
||||||
logger.log shutdownDrainTimeWindow: shutdownDrainTimeWindow,"shutdownDrainTimeWindow enabled"
|
logger.log shutdownDrainTimeWindow: shutdownDrainTimeWindow,"shutdownDrainTimeWindow enabled"
|
||||||
for signal in ['SIGINT', 'SIGHUP', 'SIGQUIT', 'SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGABRT']
|
for signal in ['SIGINT', 'SIGHUP', 'SIGQUIT', 'SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGABRT']
|
||||||
process.on signal, ->
|
process.on signal, drainAndShutdown # signal is passed as argument to event handler
|
||||||
drainAndShutdown(signal)
|
|
||||||
|
|
||||||
# global exception handler
|
# global exception handler
|
||||||
if Settings.errors?.catchUncaughtErrors
|
if Settings.errors?.catchUncaughtErrors
|
||||||
|
|
Loading…
Reference in a new issue