server stop timeout

This commit is contained in:
Jan Prochazka 2021-12-28 17:59:05 +01:00
parent fd54c176eb
commit 1e59182fda

View File

@ -131,6 +131,10 @@ function start() {
console.log('Server shut down, terminating'); console.log('Server shut down, terminating');
process.exit(0); process.exit(0);
}); });
setTimeout(() => {
console.log('Server close timeout, terminating');
process.exit(0);
}, 1000);
} }
process.on('SIGINT', shutdown); process.on('SIGINT', shutdown);