mirror of https://github.com/nodejs/node.git
test: fix test-cluster-worker-disconnect
- Just let the process exit gracefully after the worker is disconnected. Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> PR-URL: https://github.com/nodejs/io.js/pull/1919 Fixes: https://github.com/nodejs/io.js/issues/1757pull/1991/merge
parent
3beb880716
commit
52a822d944
|
@ -69,10 +69,6 @@ if (cluster.isWorker) {
|
||||||
checks.worker.emitExit = true;
|
checks.worker.emitExit = true;
|
||||||
checks.worker.died = !alive(worker.process.pid);
|
checks.worker.died = !alive(worker.process.pid);
|
||||||
checks.worker.emitDisconnectInsideWorker = code === 42;
|
checks.worker.emitDisconnectInsideWorker = code === 42;
|
||||||
|
|
||||||
process.nextTick(function() {
|
|
||||||
process.exit(0);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
process.once('exit', function() {
|
process.once('exit', function() {
|
||||||
|
|
Loading…
Reference in New Issue