From b3ec24e28fea5516fe0f8882a1681de498196088 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Thu, 25 Jan 2018 14:05:59 +0100 Subject: [PATCH] zeroconf: display more gentle errors --- app/main/osc.js | 2 ++ app/main/server.js | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/main/osc.js b/app/main/osc.js index 2e4993da..6c6fbed9 100644 --- a/app/main/osc.js +++ b/app/main/osc.js @@ -23,6 +23,8 @@ zeroconf.publish({ protocol: 'udp', type: 'osc', port: oscInPort +}).on('error', (e)=>{ + console.error(`Error: Zeroconf: ${e.message}`) }) var parseType = function(type){ diff --git a/app/main/server.js b/app/main/server.js index 89906a5b..99b9d6f5 100644 --- a/app/main/server.js +++ b/app/main/server.js @@ -28,13 +28,15 @@ express.get('*', function(req, res){ } }) -server.listen(settings.read('httpPort')) + zeroconf.publish({ name: settings.read('appName') + (settings.read('instanceName') ? ' (' + settings.read('instanceName') + ')' : ''), type: 'http', port: settings.read('httpPort') -}) +}).on('error', (e)=>{ + console.error(`Error: Zeroconf: ${e.message}`) + }) ipc.send = function(name,data,clientId) { if (clientId) {