mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
tidy up udp node - repeat setting of var
This commit is contained in:
parent
3ab0d0d865
commit
45eba5cabd
@ -43,9 +43,7 @@ module.exports = function(RED) {
|
||||
server = udpInputPortsInUse[this.port]; // re-use existing
|
||||
}
|
||||
|
||||
var opts = {type:node.ipv, reuseAddr:true};
|
||||
if (process.version.indexOf("v0.10") === 0) { opts = node.ipv; }
|
||||
var server = dgram.createSocket(opts); // default to udp4
|
||||
|
||||
server.on("error", function (err) {
|
||||
if ((err.code == "EACCES") && (node.port < 1024)) {
|
||||
|
Loading…
Reference in New Issue
Block a user