From 64fbf26fca947a970000eeb8075ea62f3c52503d Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Mon, 15 Jan 2024 22:29:38 +0000 Subject: [PATCH] feat: Updated server/index.ts --- server/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/index.ts b/server/index.ts index b7b16548c..a0e31c52a 100644 --- a/server/index.ts +++ b/server/index.ts @@ -68,7 +68,7 @@ Player Section: ${addresses[0]} DM Section: ${addresses[0]}/dm`); console.log(`\n-------------------\n`); - process.on('SIGINT', (shutdownHandler) => { + process.on('SIGINT', shutdownHandler); console.log("Shutting down gracefully"); httpServer.close((err) => { if (err) { @@ -103,6 +103,12 @@ DM Section: ${addresses[0]}/dm`); } process.exit(1); } else { + }); + process.on("SIGINT", shutdownHandler); +}); + }); + process.on("SIGINT", shutdownHandler); +}); console.log('Server shut down gracefully.'); process.exit(0); }