LearnBoost / cluster

Node.JS multi-core server manager with plugins support.

Home Page:http://learnboost.github.com/cluster

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cluster fail to restart when listen on unix socket

fredericosilva opened this issue · comments

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