Permalink
Browse files

Once catch signals once

1 parent ccb7b26 commit 9503b3d03d801ba99225137ff885ad9c1221c848 @imurchie imurchie committed Jan 5, 2017
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/main.js
View
@@ -133,12 +133,12 @@ async function main (args = null) {
throw err;
}
- process.on('SIGINT', async function () {
+ process.once('SIGINT', async function () {
logger.info(`Received SIGINT - shutting down`);
await server.close();
});
- process.on('SIGTERM', async function () {
+ process.once('SIGTERM', async function () {
logger.info(`Received SIGTERM - shutting down`);
await server.close();
});

0 comments on commit 9503b3d

Please sign in to comment.