udp node: when reusing input socket honour the broadcast mode.

This commit is contained in:
Dave Conway-Jones 2020-04-11 22:33:11 +01:00
parent f54ed8ebd1
commit bc96f2d0cb
No known key found for this signature in database
GPG Key ID: 302A6725C594817F

View File

@ -180,6 +180,10 @@ module.exports = function(RED) {
node.tout = setTimeout(function() {
if (udpInputPortsInUse[p]) {
sock = udpInputPortsInUse[p];
if (node.multicast != "false") {
sock.setBroadcast(true);
sock.setMulticastLoopback(false);
}
node.log(RED._("udp.status.re-use",{outport:node.outport,host:node.addr,port:node.port}));
if (node.iface) { node.status({text:n.iface+" : "+node.iface}); }
}