We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1473437 commit 20dc312Copy full SHA for 20dc312
1 file changed
app.js
@@ -626,8 +626,8 @@ process.on('uncaughtException', function (err) {
626
process.exit(1);
627
});
628
629
-// gracefully exit
630
-process.on('SIGINT', function () {
+// install exit handler
+function handleTermSignals() {
631
config.maintenance = true;
632
// disconnect all socket.io clients
633
Object.keys(io.sockets.sockets).forEach(function (key) {
@@ -649,4 +649,6 @@ process.on('SIGINT', function () {
649
650
}
651
}, 100);
652
-});
+}
653
+process.on('SIGINT', handleTermSignals);
654
+process.on('SIGTERM', handleTermSignals);
0 commit comments