summary refs log tree commit diff
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-10 04:59:32 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-10 04:59:32 +0200
commiteb07664e935e56bd744a11c752e6a05aae902035 (patch)
tree4d7427ee95844b72cab8c60655f606f5f4355e7d
parentFix heartbeat not accepting d == null (diff)
downloadserver-eb07664e935e56bd744a11c752e6a05aae902035.tar.xz
Make sigterm exit after 3 seconds to resolve hang under systemd
-rw-r--r--bundle/src/Server.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/bundle/src/Server.ts b/bundle/src/Server.ts
index 81948666..3ed98b15 100644
--- a/bundle/src/Server.ts
+++ b/bundle/src/Server.ts
@@ -26,6 +26,7 @@ const gateway = new Gateway.Server({ server, port, production });
 
 //this is what has been added for the /stop API route
 process.on('SIGTERM', () => {
+	setTimeout(()=>process.exit(0), 3000)
 	server.close(() => {
 		console.log("Stop API has been successfully POSTed, SIGTERM sent")
 	})