if worker process exits with code zero, don't boot up a new worker

v1.18.x
Julian Lam 10 years ago
parent 68e761bed0
commit 49dcffcbab

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

Loading…
Cancel
Save