avoid sending messages to disconnected processes
This commit is contained in:
parent
f44ed981b5
commit
2c2540417c
|
@ -66,10 +66,16 @@ class ProcessWrapper {
|
||||||
if (isHardSource) {
|
if (isHardSource) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!process.connected) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
process.send({result: constants.process.log, message: messages, type});
|
process.send({result: constants.process.log, message: messages, type});
|
||||||
}
|
}
|
||||||
|
|
||||||
send() {
|
send() {
|
||||||
|
if (!process.connected) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
process.send(...arguments);
|
process.send(...arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue