Fix SIGTERM handler not disconnecting gateway clients and leaving timeouts active

This commit is contained in:
Madeline
2023-01-26 14:29:33 +11:00
parent 1dcaa9f5f9
commit ac7a178f88
2 changed files with 9 additions and 2 deletions
+3
View File
@@ -39,6 +39,9 @@ const gateway = new Gateway.Server({ server, port, production });
process.on("SIGTERM", async () => {
console.log("Shutting down due to SIGTERM");
await gateway.stop();
await cdn.stop();
await api.stop();
server.close();
Sentry.close();
});