mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
udp node: when reusing input socket honour the broadcast mode.
This commit is contained in:
parent
f54ed8ebd1
commit
bc96f2d0cb
@ -180,6 +180,10 @@ module.exports = function(RED) {
|
|||||||
node.tout = setTimeout(function() {
|
node.tout = setTimeout(function() {
|
||||||
if (udpInputPortsInUse[p]) {
|
if (udpInputPortsInUse[p]) {
|
||||||
sock = 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}));
|
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}); }
|
if (node.iface) { node.status({text:n.iface+" : "+node.iface}); }
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user