mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2026-01-29 22:00:54 +03:00
Fix reboot caused by starting scan while wifi is connecting.
This commit is contained in:
@@ -835,8 +835,14 @@ void wifi_manager( void * pvParameters ){
|
|||||||
/* if a scan is already in progress this message is simply ignored thanks to the WIFI_MANAGER_SCAN_BIT uxBit */
|
/* if a scan is already in progress this message is simply ignored thanks to the WIFI_MANAGER_SCAN_BIT uxBit */
|
||||||
uxBits = xEventGroupGetBits(wifi_manager_event_group);
|
uxBits = xEventGroupGetBits(wifi_manager_event_group);
|
||||||
if(! (uxBits & WIFI_MANAGER_SCAN_BIT) ){
|
if(! (uxBits & WIFI_MANAGER_SCAN_BIT) ){
|
||||||
xEventGroupSetBits(wifi_manager_event_group, WIFI_MANAGER_SCAN_BIT);
|
if(esp_wifi_scan_start(&scan_config, false)!=ESP_OK){
|
||||||
ESP_ERROR_CHECK(esp_wifi_scan_start(&scan_config, false));
|
ESP_LOGW(TAG,"Unable to start scan; wifi is trying to connect");
|
||||||
|
// set_status_message(WARNING, "Wifi Connecting. Cannot start scan.");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
xEventGroupSetBits(wifi_manager_event_group, WIFI_MANAGER_SCAN_BIT);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* callback */
|
/* callback */
|
||||||
|
|||||||
Reference in New Issue
Block a user