Make "safeShutdownDuration" configurable
Defaults to 300s = 5min
This commit is contained in:
parent
eb7d91ffbc
commit
61f19ae3ce
1 changed files with 3 additions and 2 deletions
|
@ -83,7 +83,8 @@ let config = {
|
|||
server: false
|
||||
},
|
||||
accesslog: false,
|
||||
verify: false
|
||||
verify: false,
|
||||
safeShutdownDuration: 300
|
||||
}
|
||||
|
||||
// test if config.json exists, if not provide error message but try to run
|
||||
|
@ -217,7 +218,7 @@ io.on('connection', function (socket) {
|
|||
process.on('SIGINT', function () {
|
||||
if (shutdownMode) stop('Safe shutdown aborted, force quitting')
|
||||
else if (connectionCount > 0) {
|
||||
var remainingSeconds = 300
|
||||
var remainingSeconds = config.safeShutdownDuration
|
||||
shutdownMode = true
|
||||
|
||||
var message = (connectionCount === 1) ? ' client is still connected'
|
||||
|
|
Loading…
Reference in a new issue