Fix UDP node to not not use port if unassigned

This commit is contained in:
Dave Conway-Jones
2021-09-16 16:22:01 +01:00
parent 17f9829498
commit 4f23847546

View File

@@ -178,7 +178,7 @@ module.exports = function(RED) {
var sock;
var p = this.outport || this.port || "0";
node.tout = setTimeout(function() {
if (udpInputPortsInUse[p]) {
if ((p != 0) && udpInputPortsInUse[p]) {
sock = udpInputPortsInUse[p];
if (node.multicast != "false") {
sock.setBroadcast(true);