summary refs log tree commit diff
path: root/src/bundle
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-01-26 14:29:33 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-01-26 14:29:33 +1100
commitac7a178f88d96d12b322f091a43309d632eeb095 (patch)
tree41b18634ec0ba8f288bb0322f1283fc6f4c77d4f /src/bundle
parentDon't set default cdn endpoints. Null endpoints means to not update them in G... (diff)
downloadserver-ac7a178f88d96d12b322f091a43309d632eeb095.tar.xz
Fix SIGTERM handler not disconnecting gateway clients and leaving timeouts active
Diffstat (limited to 'src/bundle')
-rw-r--r--src/bundle/Server.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bundle/Server.ts b/src/bundle/Server.ts
index 96f6a149..119bb52b 100644
--- a/src/bundle/Server.ts
+++ b/src/bundle/Server.ts
@@ -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();
 });