Skip to content

Commit

Permalink
clean up previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Jun 8, 2011
1 parent e14dd69 commit c6d222c
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions lib/master.js
Expand Up @@ -514,15 +514,13 @@ Master.prototype.remove = function(n, signal){
*/

Master.prototype.removeWorker = function(id){
if(this.children[id] != null) {
// close socket pair
if(this.children[id].fds != undefined) {
binding.close(this.children[id].fds[0]);
binding.close(this.children[id].fds[1]);
}

delete this.children[id];
var worker = this.children[id];
if (!worker) return;
if (worker.fds) {
binding.close(worker.fds[0]);
binding.close(worker.fds[1]);
}
delete this.children[id];
};

/**
Expand Down

0 comments on commit c6d222c

Please sign in to comment.