Skip to content

Commit 37d7078

Browse files
Williangalvanipatrickelectric
authored andcommitted
Wifi: NetworkManager: remove connection profile it initial connection attemp fails
1 parent 9170ef0 commit 37d7078

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/services/wifi/wifi_handlers/networkmanager/networkmanager.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ async def wait_for_connection(timeout: int = 30) -> bool:
245245
# If hotspot was running, restart it
246246
if not await wait_for_connection():
247247
logger.error(f"Connection timeout for {credentials.ssid}")
248+
await self.remove_network(credentials.ssid)
248249
raise TimeoutError(f"Failed to connect to {credentials.ssid} within 30 seconds")
249250

250251
if self._settings_manager.settings.hotspot_enabled:

0 commit comments

Comments
 (0)