don't fail if zeroconf interface was shut down
This commit is contained in:
parent
a85cd8b9bf
commit
0ecba6222d
1 changed files with 4 additions and 1 deletions
|
@ -139,7 +139,10 @@ class LocalNodes(dict):
|
|||
await asyncio.gather(*tasks)
|
||||
|
||||
def on_service_state_change(self, zeroconf, service_type, name, state_change):
|
||||
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:
|
||||
|
|
Loading…
Reference in a new issue