Skip to content

Commit

Permalink
Fixing issue where the worker fails to die after sending cluster emai…
Browse files Browse the repository at this point in the history
…l when cluster is launched in "non-server" mode.
  • Loading branch information
bparise committed Apr 3, 2012
1 parent 983c7a9 commit ba24d6a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/cluster.exception.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,13 @@ exports = module.exports = function exception (options) {
console.error(error.stack || error.message);

// report exception
instance.master.call('workerException', error)
if (instance.master) {
// cluster with server
instance.master.call('workerException', error)
} else {
// cluster without server
instance.call('workerException', error)
}

// exit
process.nextTick(function (){
Expand Down

0 comments on commit ba24d6a

Please sign in to comment.