Merge pull request #489 from embark-framework/avoid_zombies

avoid sending messages to disconnected processes
This commit is contained in:
Iuri Matias 2018-06-06 11:24:16 -04:00 committed by GitHub
commit e2f2c84aa2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -66,10 +66,13 @@ class ProcessWrapper {
if (isHardSource) { if (isHardSource) {
return; return;
} }
process.send({result: constants.process.log, message: messages, type}); this.send({result: constants.process.log, message: messages, type});
} }
send() { send() {
if (!process.connected) {
return;
}
process.send(...arguments); process.send(...arguments);
} }