diff --git a/src/main.ts b/src/main.ts index 07fb83f..21aa84a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -819,9 +819,10 @@ async function main() { services.cronServices.forEach(c => c.stop()); services.pollingServices.forEach(p => p.stop()); await gateway.stop(); + apiServer.close(); process.exit(0); }; - + process.on('SIGINT', shutdown); process.on('SIGTERM', shutdown); }