1
0
mirror of https://github.com/esphome/esphome.git synced 2026-02-08 00:31:58 +00:00

[wifi] Fix ESP8266 yield panic when WiFi scan fails (#13603)

This commit is contained in:
J. Nick Koston
2026-01-28 09:40:00 -10:00
committed by GitHub
parent d86048cc2d
commit 87fcfc9d76

View File

@@ -756,7 +756,10 @@ void WiFiComponent::wifi_scan_done_callback_(void *arg, STATUS status) {
if (status != OK) {
ESP_LOGV(TAG, "Scan failed: %d", status);
this->retry_connect();
// Don't call retry_connect() here - this callback runs in SDK system context
// where yield() cannot be called. Instead, just set scan_done_ and let
// check_scanning_finished() handle the empty scan_result_ from loop context.
this->scan_done_ = true;
return;
}