Skip to content

Commit 7588aba

Browse files
committed
stop_station when no wifi-reconnect
1 parent b100041 commit 7588aba

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

supervisor/shared/web_workflow/web_workflow.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,9 @@ bool supervisor_start_web_workflow(bool reload) {
266266

267267
os_getenv_err_t result = common_hal_os_getenv_str("CIRCUITPY_WIFI_SSID", ssid, sizeof(ssid));
268268
if (result != GETENV_OK) {
269+
#if CIRCUITPY_CYW43
270+
common_hal_wifi_radio_stop_station(&common_hal_wifi_radio_obj);
271+
#endif
269272
return false;
270273
}
271274

@@ -274,6 +277,10 @@ bool supervisor_start_web_workflow(bool reload) {
274277
// if password is unspecified, assume an open network
275278
password[0] = '\0';
276279
} else if (result != GETENV_OK) {
280+
#if CIRCUITPY_CYW43
281+
common_hal_wifi_radio_stop_station(&common_hal_wifi_radio_obj);
282+
#endif
283+
277284
return false;
278285
}
279286

0 commit comments

Comments
 (0)