track if couldn't send message to parent process
This commit is contained in:
parent
0429703790
commit
a62122a6d3
|
@ -39,7 +39,10 @@ class ProcessWrapper {
|
|||
}
|
||||
setInterval(() => {
|
||||
try {
|
||||
self.send({action: 'ping'});
|
||||
let result = self.send({action: 'ping'});
|
||||
if (!result) {
|
||||
return error();
|
||||
}
|
||||
} catch (e) {
|
||||
error();
|
||||
}
|
||||
|
@ -71,9 +74,10 @@ class ProcessWrapper {
|
|||
|
||||
send() {
|
||||
if (!process.connected) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
process.send(...arguments);
|
||||
return true;
|
||||
}
|
||||
|
||||
kill() {
|
||||
|
|
Loading…
Reference in New Issue