Permalink
Browse files

Merge pull request #7648 from appium/isaac-stop

Only catch signals once
  • Loading branch information...
2 parents ccb7b26 + 9503b3d commit d825a1716c7478658efa4ce26fc318b21d136541 @imurchie imurchie committed on GitHub 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 d825a17

Please sign in to comment.