From a241af753ed0a2824ce64165f846a5408add35aa Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sun, 25 Aug 2024 16:35:19 +0200 Subject: [PATCH] Server crashes now results in exit code of 1 if errno is not specified. --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index a52f6b3..e119626 100644 --- a/src/index.js +++ b/src/index.js @@ -524,7 +524,7 @@ if (cluster.isPrimary || cluster.isPrimary === undefined) { serverconsole.locerrmessage( err.stack ? generateErrorStack(err) : String(err), ); - process.exit(err.errno); + process.exit(err.errno !== undefined ? err.errno : 1); } process.on("uncaughtException", crashHandlerMaster); @@ -601,7 +601,7 @@ if (cluster.isPrimary || cluster.isPrimary === undefined) { serverconsole.locerrmessage( err.stack ? generateErrorStack(err) : String(err), ); - process.exit(err.errno); + process.exit(err.errno !== undefined ? err.errno : 1); } process.on("uncaughtException", crashHandler);