don't fail if zeroconf interface was shut down

This commit is contained in:
j 2024-08-09 15:41:19 +02:00
parent a85cd8b9bf
commit 0ecba6222d

View file

@ -139,7 +139,10 @@ class LocalNodes(dict):
await asyncio.gather(*tasks)
def on_service_state_change(self, zeroconf, service_type, name, state_change):
info = zeroconf.get_service_info(service_type, name)
try:
info = zeroconf.get_service_info(service_type, name)
except zeroconf._exceptions.NotRunningException:
return
if info and b'id' in info.properties:
id = info.properties[b'id'].decode()
if id == settings.USER_ID: