Prevent background restarting, allow retry quit

This commit is contained in:
Wietse Wind
2023-10-11 02:41:33 +02:00
parent f22d8c455e
commit b43776f007

View File

@@ -106,8 +106,15 @@ if (!sigintEventHandler) {
const quit = () => {
if (!quitting) {
clearTimeout(aliveInterval)
quitting = true
// Allow for re-quit shortly after
setTimeout(() => {
quitting = false
}, 1000)
console.log('Closing (interrupting) connections', connections.length)
connections
.map(async c => {