Wait upto 3 seconds for the app to quit
Otherwise systemd will kill us and we get crash emails. Fixes #483
This commit is contained in:
@@ -43,5 +43,13 @@ server.start(function (err) {
|
||||
|
||||
var NOOP_CALLBACK = function () { };
|
||||
|
||||
process.on('SIGINT', function () { server.stop(NOOP_CALLBACK); });
|
||||
process.on('SIGTERM', function () { server.stop(NOOP_CALLBACK); });
|
||||
process.on('SIGINT', function () {
|
||||
server.stop(NOOP_CALLBACK);
|
||||
setTimeout(process.exit.bind(process), 3000);
|
||||
});
|
||||
|
||||
process.on('SIGTERM', function () {
|
||||
server.stop(NOOP_CALLBACK);
|
||||
setTimeout(process.exit.bind(process), 3000);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user