From 93757437392ea2da5410f1dda6013182e8bbd0bc 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:22:26 +0000 Subject: [PATCH] feat: Updated server/index.ts --- server/index.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/index.ts b/server/index.ts index 7da236b03..b197bada8 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', () => { + process.on('SIGINT', (shutdownHandler) => { console.log("Shutting down gracefully"); httpServer.close((err) => { if (err) { @@ -97,7 +97,10 @@ DM Section: ${addresses[0]}/dm`); httpServer.close((err) => { if (err) { - console.error('Server shutdown error:', err); + console.error('Server shutdown error:', err); + if (err) { + process.exitCode = 1; + } process.exit(1); } else { console.log('Server shut down gracefully.');