[libretiny] Fix WiFi scan timeout loop when scan fails (#12356)

This commit is contained in:
J. Nick Koston
2025-12-08 15:09:04 +01:00
committed by Jonathan Swoboda
parent 436d2c44e8
commit 16fe8f9e9e

View File

@@ -412,6 +412,7 @@ bool WiFiComponent::wifi_scan_start_(bool passive) {
}
void WiFiComponent::wifi_scan_done_callback_() {
this->scan_result_.clear();
this->scan_done_ = true;
int16_t num = WiFi.scanComplete();
if (num < 0)
@@ -430,7 +431,6 @@ void WiFiComponent::wifi_scan_done_callback_() {
ssid.length() == 0);
}
WiFi.scanDelete();
this->scan_done_ = true;
}
#ifdef USE_WIFI_AP