From 5931e13b9cd022380df49becf1a056a39fba0aa8 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Tue, 6 Feb 2018 11:34:24 +0000 Subject: [PATCH] move node.send in exec and httprequest nodes just in case --- nodes/core/core/75-exec.js | 2 +- nodes/core/io/21-httprequest.js | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/nodes/core/core/75-exec.js b/nodes/core/core/75-exec.js index 2638dd1da..3179d26d0 100644 --- a/nodes/core/core/75-exec.js +++ b/nodes/core/core/75-exec.js @@ -152,9 +152,9 @@ module.exports = function(RED) { msg.rc = msg3.payload; if (msg2) { msg2.rc = msg3.payload; } } - node.send([msg,msg2,msg3]); if (child.tout) { clearTimeout(child.tout); } delete node.activeProcesses[child.pid]; + node.send([msg,msg2,msg3]); }); node.status({fill:"blue",shape:"dot",text:"pid:"+child.pid}); child.on('error',function() {}); diff --git a/nodes/core/io/21-httprequest.js b/nodes/core/io/21-httprequest.js index 6737b676e..c59c3fd97 100644 --- a/nodes/core/io/21-httprequest.js +++ b/nodes/core/io/21-httprequest.js @@ -263,9 +263,8 @@ module.exports = function(RED) { catch(e) { node.warn(RED._("httpin.errors.json-error")); } } } - - node.send(msg); node.status({}); + node.send(msg); } }); }); @@ -280,8 +279,8 @@ module.exports = function(RED) { node.error(err,msg); msg.payload = err.toString() + " : " + url; msg.statusCode = err.code; - node.send(msg); node.status({fill:"red",shape:"ring",text:err.code}); + node.send(msg); }); if (payload) { req.write(payload);