LearnBoost / cluster

Node.JS multi-core server manager with plugins support.
http://learnboost.github.com/cluster
MIT License
2.29k stars 159 forks source link

cluster fail to restart when listen on unix socket #151

Closed fredericosilva closed 12 years ago

fredericosilva commented 12 years ago

Hello,

There is an error on master.js#L807

fs.unlink(this.port, function(err){
  if ('ENOENT' != err.code) throw err;
  startListening();
});

it should be

fs.unlink(this.port, function(err){
  if (err && 'ENOENT' != err.code) throw err;
  startListening();
});

to check the case when the socket is actually removed (err is null)

keep up the work.

err: TypeError: Cannot read property 'code' of null

tj commented 12 years ago

fixed by b4b6350