We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f1c0109 commit 84e9b75Copy full SHA for 84e9b75
1 file changed
system/ui/lib/wifi_manager.py
@@ -115,7 +115,7 @@ async def shutdown(self) -> None:
115
except asyncio.CancelledError:
116
pass
117
if self.bus:
118
- await self.bus.disconnect()
+ self.bus.disconnect()
119
120
async def request_scan(self) -> None:
121
try:
@@ -634,8 +634,10 @@ def _run(self):
634
635
def shutdown(self) -> None:
636
if self._running:
637
- if self._manager is not None:
638
- self._run_coroutine(self._manager.shutdown())
+ if self._manager is not None and self._loop:
+ shutdown_future = asyncio.run_coroutine_threadsafe(self._manager.shutdown(), self._loop)
639
+ shutdown_future.result(timeout=3.0)
640
+
641
if self._loop and self._loop.is_running():
642
self._loop.call_soon_threadsafe(self._loop.stop)
643
if self._thread and self._thread.is_alive():
0 commit comments