osc: catch server error when port is invalid

This commit is contained in:
bordun 2020-10-03 18:54:58 +02:00
parent 922d58a380
commit f081f0c3b8

View file

@ -164,6 +164,11 @@ class OscServer {
return
}
if (isNaN(parseInt(data.port))) {
console.error('(ERROR, OSC) Invalid port: ' + data.port)
return
}
if (tcpInPort && oscTCPServer.clients[data.host] && oscTCPServer.clients[data.host][data.port]) {
oscTCPServer.clients[data.host][data.port].send({