From 944b81b71cfa75c4bbc5f54ea275be3a7228a5b8 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Thu, 15 Aug 2019 10:20:54 +0100 Subject: [PATCH] Update UDP nodes for node.done --- packages/node_modules/@node-red/nodes/core/io/32-udp.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/nodes/core/io/32-udp.js b/packages/node_modules/@node-red/nodes/core/io/32-udp.js index cf4751760..60e9bec08 100644 --- a/packages/node_modules/@node-red/nodes/core/io/32-udp.js +++ b/packages/node_modules/@node-red/nodes/core/io/32-udp.js @@ -223,16 +223,19 @@ module.exports = function(RED) { udpInputPortsInUse[p] = sock; } - node.on("input", function(msg) { + node.on("input", function(msg, nodeSend, nodeDone) { if (msg.hasOwnProperty("payload")) { var add = node.addr || msg.ip || ""; var por = node.port || msg.port || 0; if (add === "") { node.warn(RED._("udp.errors.ip-notset")); + nodeDone(); } else if (por === 0) { node.warn(RED._("udp.errors.port-notset")); + nodeDone(); } else if (isNaN(por) || (por < 1) || (por > 65535)) { node.warn(RED._("udp.errors.port-invalid")); + nodeDone(); } else { var message; if (node.base64) { @@ -247,6 +250,7 @@ module.exports = function(RED) { node.error("udp : "+err,msg); } message = null; + nodeDone(); }); } }