1
0
Fork 0
forked from svrjs/svrjs

Server crashes now results in exit code of 1 if errno is not specified.

This commit is contained in:
Dorian Niemiec 2024-08-25 16:35:19 +02:00
parent 984c94cd00
commit a241af753e

View file

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