We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aee8b6c commit dc94b29Copy full SHA for dc94b29
1 file changed
index.js
@@ -72,8 +72,11 @@ process.on('exit', function () {
72
});
73
74
75
-process.on('SIGINT', function() {
76
- console.log('Got SIGINT. Trying to exit gracefully.');
+process.on('SIGINT', shutDown);
+process.on('SIGTERM', shutDown);
77
+
78
+function shutDown(){
79
+ console.log('Got a kill signal. Trying to exit gracefully.');
80
calledClose = true;
81
httpServer.close(function() {
82
httpsServer.close(function() {
@@ -82,4 +85,4 @@ process.on('SIGINT', function() {
85
83
86
84
87
-});
88
+}
0 commit comments