Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function _announcedOnMulticastSubnet(
conf: MdnsDiscoveryConfiguration,
announcement: Announcement
): Promise {
let b = ((conf as any).bonjourHolder) as BonjourHolder;
if (b) {
if (sameAnnouncement(b.announcement!, announcement)) {
debugLog("Configuration ", conf.mdnsServerName, " has not changed !");
// nothing to do
return;
} else {
debugLog("Configuration ", conf.mdnsServerName, " HAS changed !");
debugLog(" Was ", b.announcement!);
debugLog(" is ", announcement);
}
await _stop_announcedOnMulticastSubnet(conf);
}
b = new BonjourHolder();
((conf as any).bonjourHolder) = b;
await b._announcedOnMulticastSubnet(announcement);
}