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())
|
asyncio.create_task(self.register_service())
|
||||||
self.browse()
|
self.browse()
|
||||||
|
|
||||||
def _update_if_ip_changed(self):
|
async def _update_if_ip_changed(self):
|
||||||
local_ips = get_broadcast_interfaces()
|
local_ips = get_broadcast_interfaces()
|
||||||
username = settings.preferences.get('username', 'anonymous')
|
username = settings.preferences.get('username', 'anonymous')
|
||||||
if local_ips != self.local_ips or self.username != username:
|
if local_ips != self.local_ips or self.username != username:
|
||||||
asyncio.run(self.close())
|
await self.close()
|
||||||
self.setup()
|
self.setup()
|
||||||
|
|
||||||
def browse(self):
|
def browse(self):
|
||||||
|
|
Loading…
Reference in a new issue