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);