tcp: prevent sending osc messages on udp port when the same port number is set as a tcp target

This commit is contained in:
bordun 2020-01-03 10:02:43 +01:00
parent bc0366bb31
commit 79c56761c1
2 changed files with 10 additions and 5 deletions

View file

@ -4,6 +4,7 @@
- bug fixes
- strip: layout issues when moving widget in a strip (min width/height still active)
- tcp: prevent sending osc messages on udp port when the same port number is set as a tcp target
## 0.48.7

View file

@ -163,16 +163,20 @@ class OscServer {
return
}
oscUDPServer.send({
address: data.address,
args: data.args
}, data.host, data.port)
if (tcpInPort && oscTCPServer.clients[data.host] && oscTCPServer.clients[data.host][data.port]) {
oscTCPServer.clients[data.host][data.port].send({
address: data.address,
args: data.args
})
} else {
oscUDPServer.send({
address: data.address,
args: data.args
}, data.host, data.port)
}
if (debug) console.log('OSC sent: ',{address:data.address, args: data.args}, 'To: ' + data.host + ':' + data.port)