From 2163f19198b0e24aab592dc35d9fdc5a7c069137 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Fri, 25 May 2018 13:42:25 +0200 Subject: [PATCH] osc: better init task --- app/main/osc/index.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/app/main/osc/index.js b/app/main/osc/index.js index bb1f1967..dc9280d1 100644 --- a/app/main/osc/index.js +++ b/app/main/osc/index.js @@ -190,15 +190,12 @@ class OscServer { }) oscUDPServer.on('message', this.oscInHandlerWrapper.bind(this)) - oscTCPServer.on('message', this.oscInHandlerWrapper.bind(this)) - - oscUDPServer.on('error', function(error) { - console.error(error) - }) - oscUDPServer.open() - if (settings.read('tcpInPort')) oscTCPServer.open() + if (settings.read('tcpInPort')) { + oscTCPServer.on('message', this.oscInHandlerWrapper.bind(this)) + oscTCPServer.open() + } if (this.customModule.init) { this.customModule.init()