From 24fc0a8b30000bd9203d680a576fad22bd6e058c Mon Sep 17 00:00:00 2001 From: Dominique Da Silva Date: Sat, 9 Nov 2019 00:59:43 +0000 Subject: [PATCH] Try to send msg to fork to not crash the app --- lib/executor.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/executor.js b/lib/executor.js index 1cf1d959..26d6cfe7 100644 --- a/lib/executor.js +++ b/lib/executor.js @@ -65,11 +65,15 @@ function start(type, data, startedCallback, finishedCallback, failedCallback) { failedCallback }; - executorProcess.send({ - type: 'start-' + type, - data, - tid: messageTid - }); + try { + executorProcess.send({ + type: 'start-' + type, + data, + tid: messageTid + }); + } catch (error) { + failedCallback('Executor process: ' + error.message); + } messageTid++; }