Permalink
Browse files

Fixed clobbering of "worker exception" [reported by fredericosilva]

  • Loading branch information...
1 parent a3fb1ec commit 80bcf50ed08d781dcb8984a69e9ba785104486d9 @tj tj committed Aug 15, 2011
Showing with 7 additions and 5 deletions.
  1. +7 −5 lib/master.js
View
@@ -157,11 +157,13 @@ var Master = module.exports = function Master(server) {
});
// kill children on master exception
- process.on('uncaughtException', function(err){
- self.kill('SIGKILL');
- console.error(err.stack || String(err));
- process.exit(1);
- });
+ if (this.isMaster) {
+ process.on('uncaughtException', function(err){
+ self.kill('SIGKILL');
+ console.error(err.stack || String(err));
+ process.exit(1);
+ });
+ }
};
/**

0 comments on commit 80bcf50

Please sign in to comment.