fixed error changing setting in mDNS

This commit is contained in:
tigerbot 2017-10-30 16:00:35 -06:00
parent 16589e65f6
commit 9ec642237c
1 changed files with 4 additions and 3 deletions

View File

@ -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();
}
}