ui/wifi: fix no attribute error (#36653)

This commit is contained in:
Adeeb Shihadeh
2025-11-19 14:18:48 -08:00
committed by GitHub
parent 9d0ab68f3b
commit c8effae4eb

View File

@@ -138,6 +138,8 @@ class WifiManager:
self._nm = DBusAddress(NM_PATH, bus_name=NM, interface=NM_IFACE)
except FileNotFoundError:
cloudlog.exception("Failed to connect to system D-Bus")
self._router_main = None
self._conn_monitor = None
self._exit = True
# Store wifi device path
@@ -752,6 +754,8 @@ class WifiManager:
if self._state_thread.is_alive():
self._state_thread.join()
self._router_main.close()
self._router_main.conn.close()
self._conn_monitor.close()
if self._router_main is not None:
self._router_main.close()
self._router_main.conn.close()
if self._conn_monitor is not None:
self._conn_monitor.close()