Merge pull request #522 from embark-framework/zombie_fix
track if couldn't send message to parent process
This commit is contained in:
commit
d44021d7f9
|
@ -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() {
|
||||||
|
|
Loading…
Reference in New Issue