From 09ef59832f78442864f2ed67285f65b383f2d232 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sun, 25 Aug 2024 16:29:37 +0200 Subject: [PATCH] Server crashes now results in exit code of 1 if errno is not specified. --- svr.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/svr.js b/svr.js index 811c141..9400e52 100644 --- a/svr.js +++ b/svr.js @@ -5859,7 +5859,7 @@ if (cluster.isPrimary || cluster.isPrimary === undefined) { serverconsole.locerrmessage("SVR.JS worker just crashed!!!"); serverconsole.locerrmessage("Stack:"); serverconsole.locerrmessage(err.stack ? generateErrorStack(err) : String(err)); - process.exit(err.errno); + process.exit(err.errno !== undefined ? err.errno : 1); } process.on("uncaughtException", crashHandlerMaster); @@ -5923,7 +5923,7 @@ if (cluster.isPrimary || cluster.isPrimary === undefined) { serverconsole.locerrmessage("SVR.JS worker just crashed!!!"); serverconsole.locerrmessage("Stack:"); serverconsole.locerrmessage(err.stack ? generateErrorStack(err) : String(err)); - process.exit(err.errno); + process.exit(err.errno !== undefined ? err.errno : 1); } process.on("uncaughtException", crashHandler); @@ -5947,6 +5947,6 @@ try { serverconsole.locerrmessage("Stack:"); serverconsole.locerrmessage(generateErrorStack(err)); setTimeout(function () { - process.exit(err.errno ? err.errno : 1); + process.exit(err.errno !== undefined ? err.errno : 1); }, 10); }