diff --git a/system/ui/lib/wifi_manager.py b/system/ui/lib/wifi_manager.py index 479bad7ec..8f1382a52 100644 --- a/system/ui/lib/wifi_manager.py +++ b/system/ui/lib/wifi_manager.py @@ -617,11 +617,12 @@ class WifiManager: conn_path = self._connections.get(ssid, None) if conn_path is None: cloudlog.warning(f"Trying to forget unknown connection: {ssid}") - return - - conn_addr = DBusAddress(conn_path, bus_name=NM, interface=NM_CONNECTION_IFACE) - self._router_main.send_and_get_reply(new_method_call(conn_addr, 'Delete')) + else: + conn_addr = DBusAddress(conn_path, bus_name=NM, interface=NM_CONNECTION_IFACE) + self._router_main.send_and_get_reply(new_method_call(conn_addr, 'Delete')) + # FIXME: race here where ConnectionRemoved signal may arrive after we update all Network is_saved + # and keep the old ssid's is_saved=True self._update_networks() self._enqueue_callbacks(self._forgotten, ssid)