Skip to content

Commit

Permalink
Revert "cluster: wait on servers closing before disconnect"
Browse files Browse the repository at this point in the history
This reverts commit 9c0a1b8.

CI is timing out, work is continuing in
#1934
  • Loading branch information
sam-github committed Jun 11, 2015
1 parent 0f68377 commit e194480
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 58 deletions.
18 changes: 2 additions & 16 deletions lib/cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -627,26 +627,12 @@ function workerInit() {

Worker.prototype.disconnect = function() {
this.suicide = true;
var waitingHandles = 0;

function checkRemainingHandles() {
waitingHandles--;
if (waitingHandles === 0) {
process.disconnect();
}
}

for (var key in handles) {
var handle = handles[key];
delete handles[key];
waitingHandles++;
handle.owner.close(checkRemainingHandles);
}

if (waitingHandles === 0) {
process.disconnect();
handle.close();
}

process.disconnect();
};

Worker.prototype.destroy = function() {
Expand Down
42 changes: 0 additions & 42 deletions test/parallel/test-cluster-worker-wait-server-close.js

This file was deleted.

0 comments on commit e194480

Please sign in to comment.