stop_station when no wifi-reconnect

This commit is contained in:
Bill Sideris 2023-09-06 16:58:12 +03:00
parent b100041bf7
commit 7588abad32
No known key found for this signature in database
GPG Key ID: 1BEF1BCEBA58EA33
1 changed files with 7 additions and 0 deletions

View File

@ -266,6 +266,9 @@ bool supervisor_start_web_workflow(bool reload) {
os_getenv_err_t result = common_hal_os_getenv_str("CIRCUITPY_WIFI_SSID", ssid, sizeof(ssid));
if (result != GETENV_OK) {
#if CIRCUITPY_CYW43
common_hal_wifi_radio_stop_station(&common_hal_wifi_radio_obj);
#endif
return false;
}
@ -274,6 +277,10 @@ bool supervisor_start_web_workflow(bool reload) {
// if password is unspecified, assume an open network
password[0] = '\0';
} else if (result != GETENV_OK) {
#if CIRCUITPY_CYW43
common_hal_wifi_radio_stop_station(&common_hal_wifi_radio_obj);
#endif
return false;
}