From 761f973895ac423e0ae37c00f06f8fc37d1d7787 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 13 Jun 2024 13:31:15 +0100 Subject: [PATCH] ip change is async --- oml/localnodes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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):