diff --git a/lib/mdns.js b/lib/mdns.js index 9372b22..2c64bfd 100644 --- a/lib/mdns.js +++ b/lib/mdns.js @@ -187,9 +187,10 @@ module.exports.create = function (deps, config) { promise = stop().then(start); } else { // Can't check membership, so just add the current broadcast address to make sure - // it's set. Hopefully nothing bad happens by adding multiple addresses or adding - // the same address multiple times. - socket.addMembership(config.mdns.broadcast); + // it's set. If it's already set it will throw an exception (at least on linux). + try { + socket.addMembership(config.mdns.broadcast); + } catch (e) {} promise = Promise.resolve(); } }