CLI: Do not exit(0) so each module can close its connections (#3634)
This commit is contained in:
@@ -84,9 +84,7 @@ function startServer(options, callback) {
|
||||
const handleShutdown = function() {
|
||||
console.log('Termination signal received. Shutting down.');
|
||||
destroyAliveConnections();
|
||||
server.close(function () {
|
||||
process.exit(0);
|
||||
});
|
||||
server.close();
|
||||
};
|
||||
process.on('SIGTERM', handleShutdown);
|
||||
process.on('SIGINT', handleShutdown);
|
||||
|
||||
Reference in New Issue
Block a user