mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-06 11:36:59 +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 */
|
||||
uxBits = xEventGroupGetBits(wifi_manager_event_group);
|
||||
if(! (uxBits & WIFI_MANAGER_SCAN_BIT) ){
|
||||
xEventGroupSetBits(wifi_manager_event_group, WIFI_MANAGER_SCAN_BIT);
|
||||
ESP_ERROR_CHECK(esp_wifi_scan_start(&scan_config, false));
|
||||
if(esp_wifi_scan_start(&scan_config, false)!=ESP_OK){
|
||||
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 */
|
||||
|
||||
Reference in New Issue
Block a user