1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

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
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF

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);