diff --git a/index.js b/index.js index c9f2eb59b..b881e2dab 100644 --- a/index.js +++ b/index.js @@ -13,6 +13,11 @@ controller.start(); process.on('SIGINT', handleQuit); process.on('SIGTERM', handleQuit); +let stopping = false; + function handleQuit() { - controller.stop(() => process.exit()); + if (!stopping) { + stopping = true; + controller.stop(() => process.exit()); + } }