Merge pull request #522 from embark-framework/zombie_fix

track if couldn't send message to parent process
This commit is contained in:
Iuri Matias 2018-06-13 14:23:59 -04:00 committed by GitHub
commit d44021d7f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -39,7 +39,11 @@ class ProcessWrapper {
} }
setInterval(() => { setInterval(() => {
try { try {
self.send({action: 'ping'}); let result = self.send({action: 'ping'});
if (!result) {
return error();
}
self.retries = 0;
} catch (e) { } catch (e) {
error(); error();
} }
@ -71,9 +75,9 @@ class ProcessWrapper {
send() { send() {
if (!process.connected) { if (!process.connected) {
return; return false;
} }
process.send(...arguments); return process.send(...arguments);
} }
kill() { kill() {