pass the signal correctly to the shutdown handler

This commit is contained in:
Brian Gough 2020-02-04 11:14:53 +00:00
parent 1fc8cc44c3
commit e263d37476

View file

@ -135,8 +135,7 @@ if Settings.shutdownDrainTimeWindow?
shutdownDrainTimeWindow = parseInt(Settings.shutdownDrainTimeWindow, 10)
logger.log shutdownDrainTimeWindow: shutdownDrainTimeWindow,"shutdownDrainTimeWindow enabled"
for signal in ['SIGINT', 'SIGHUP', 'SIGQUIT', 'SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGABRT']
process.on signal, ->
drainAndShutdown(signal)
process.on signal, drainAndShutdown # signal is passed as argument to event handler
# global exception handler
if Settings.errors?.catchUncaughtErrors