ip change is async
This commit is contained in:
parent
7b826468d8
commit
761f973895
1 changed files with 2 additions and 2 deletions
|
@ -72,11 +72,11 @@ class LocalNodes(dict):
|
|||
asyncio.create_task(self.register_service())
|
||||
self.browse()
|
||||
|
||||
def _update_if_ip_changed(self):
|
||||
async def _update_if_ip_changed(self):
|
||||
local_ips = get_broadcast_interfaces()
|
||||
username = settings.preferences.get('username', 'anonymous')
|
||||
if local_ips != self.local_ips or self.username != username:
|
||||
asyncio.run(self.close())
|
||||
await self.close()
|
||||
self.setup()
|
||||
|
||||
def browse(self):
|
||||
|
|
Loading…
Reference in a new issue