From 8fb70564db497d0ab292a03706c162ba2427e950 Mon Sep 17 00:00:00 2001 From: tigerbot Date: Thu, 15 Jun 2017 16:46:41 -0600 Subject: [PATCH] temp disable of direct mDNS responses --- lib/mdns.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/mdns.js b/lib/mdns.js index 974d6dc..165deb1 100644 --- a/lib/mdns.js +++ b/lib/mdns.js @@ -137,13 +137,15 @@ module.exports.start = function (deps, config, mainPort) { randomId.get().then(function (name) { var resp = createResponse(name, packet, config.mdns.ttl, mainPort); - var now = Date.now(); - if (now > nextBroadcast) { + // TODO: uncomment the lines below after the demo and fix the installer so that + // it can get the direct responses even on macOS. + // var now = Date.now(); + // if (now > nextBroadcast) { socket.send(resp, config.mdns.port, config.mdns.broadcast); - nextBroadcast = now + config.mdns.ttl * 1000; - } else { - socket.send(resp, rinfo.port, rinfo.address); - } + // nextBroadcast = now + config.mdns.ttl * 1000; + // } else { + // socket.send(resp, rinfo.port, rinfo.address); + // } }); });