Skip to content

Commit

Permalink
Merge pull request #529 from harlentan/patch-1
Browse files Browse the repository at this point in the history
fix worker will die if the master exit
  • Loading branch information
lamweili committed Jan 5, 2022
2 parents f8d46a9 + 4565359 commit 0144f9a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/appenders/multiprocess.js
Expand Up @@ -121,6 +121,11 @@ function workerAppender(config) {
socket.on('timeout', socket.end.bind(socket));
// don't bother listening for 'error', 'close' gets called after that anyway
socket.on('close', createSocket);
socket.on('error', (e) => {
debug('connection error', e);
canWrite = false;
emptyBuffer();
});
}

createSocket();
Expand Down

0 comments on commit 0144f9a

Please sign in to comment.