diff --git a/oml/localnodes.py b/oml/localnodes.py index 3e9bbb3..2b78cb5 100644 --- a/oml/localnodes.py +++ b/oml/localnodes.py @@ -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):