mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
server stop timeout
This commit is contained in:
parent
fd54c176eb
commit
1e59182fda
@ -127,10 +127,14 @@ function start() {
|
|||||||
|
|
||||||
function shutdown() {
|
function shutdown() {
|
||||||
console.log('\nShutting down DbGate API server');
|
console.log('\nShutting down DbGate API server');
|
||||||
server.close( ()=> {
|
server.close(() => {
|
||||||
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);
|
||||||
|
Loading…
Reference in New Issue
Block a user