Once catch signals once
MODIFY
lib/main.js
lib/main.js
@@ -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();
});

Once catch signals once