mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-28 17:46:16 +01:00
if worker process exits with code zero, don't boot up a new worker
This commit is contained in:
@@ -71,7 +71,7 @@ Loader.addWorkerEvents = function(worker) {
|
||||
}
|
||||
|
||||
console.log('[cluster] Child Process (' + worker.pid + ') has exited (code: ' + code + ', signal: ' + signal +')');
|
||||
if (!worker.suicide) {
|
||||
if (!(worker.suicide || code === 0)) {
|
||||
console.log('[cluster] Spinning up another process...');
|
||||
|
||||
forkWorker(worker.index, worker.isPrimary);
|
||||
|
||||
Reference in New Issue
Block a user