[mdns] Fix NonUniqueNameException

Service names have to be unique even accross different interfaces
This commit is contained in:
tituspijean 2021-07-11 17:32:33 +00:00
parent f14dcec711
commit 92a1a12226

View file

@ -246,7 +246,7 @@ if __name__ == '__main__':
infos.append( infos.append(
AsyncServiceInfo( AsyncServiceInfo(
type_='_device-info._tcp.local.', type_='_device-info._tcp.local.',
name=d_domain+'._device-info._tcp.local.', name=interface+' '+d_domain+'._device-info._tcp.local.',
addresses=b_ips, addresses=b_ips,
port=80, port=80,
server=d+'.', server=d+'.',
@ -255,7 +255,7 @@ if __name__ == '__main__':
infos.append( infos.append(
AsyncServiceInfo( AsyncServiceInfo(
type_='_http._tcp.local.', type_='_http._tcp.local.',
name=d_domain+'._http._tcp.local.', name=interface+' '+d_domain+'._http._tcp.local.',
addresses=b_ips, addresses=b_ips,
port=80, port=80,
server=d+'.', server=d+'.',