From 2c2540417cc41e82a4011d2f65437491a1e1b8ef Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Wed, 6 Jun 2018 10:42:06 -0400 Subject: [PATCH] avoid sending messages to disconnected processes --- lib/process/processWrapper.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/process/processWrapper.js b/lib/process/processWrapper.js index 9b4fbe1d7..6f7e207a2 100644 --- a/lib/process/processWrapper.js +++ b/lib/process/processWrapper.js @@ -66,10 +66,16 @@ class ProcessWrapper { if (isHardSource) { return; } + if (!process.connected) { + return; + } process.send({result: constants.process.log, message: messages, type}); } send() { + if (!process.connected) { + return; + } process.send(...arguments); }