From 4f3a6821d1a8ad934eaebeb78280601e6d027b48 Mon Sep 17 00:00:00 2001 From: Kunihiko Toumura Date: Fri, 29 Nov 2019 16:12:25 +0900 Subject: [PATCH] new-style callback function (http response node) --- .../node_modules/@node-red/nodes/core/network/21-httpin.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/nodes/core/network/21-httpin.js b/packages/node_modules/@node-red/nodes/core/network/21-httpin.js index 6cf243cf8..322cb37e9 100644 --- a/packages/node_modules/@node-red/nodes/core/network/21-httpin.js +++ b/packages/node_modules/@node-red/nodes/core/network/21-httpin.js @@ -281,7 +281,7 @@ module.exports = function(RED) { var node = this; this.headers = n.headers||{}; this.statusCode = n.statusCode; - this.on("input",function(msg) { + this.on("input",function(msg,_send,done) { if (msg.res) { var headers = RED.util.cloneMessage(node.headers); if (msg.headers) { @@ -347,6 +347,7 @@ module.exports = function(RED) { } else { node.warn(RED._("httpin.errors.no-response")); } + done(); }); } RED.nodes.registerType("http response",HTTPOut);