mirror of
https://github.com/esphome/esphome.git
synced 2026-06-02 03:02:19 +08:00
[wifi] Fix scan timeout loop when scan returns zero networks (#12354)
This commit is contained in:
committed by
Jonathan Swoboda
parent
b213555dd2
commit
436d2c44e8
@@ -1209,8 +1209,8 @@ WiFiRetryPhase WiFiComponent::determine_next_phase_() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case WiFiRetryPhase::SCAN_CONNECTING:
|
case WiFiRetryPhase::SCAN_CONNECTING:
|
||||||
// If scan found no matching networks, skip to hidden network mode
|
// If scan found no networks or no matching networks, skip to hidden network mode
|
||||||
if (!this->scan_result_.empty() && !this->scan_result_[0].get_matches()) {
|
if (this->scan_result_.empty() || !this->scan_result_[0].get_matches()) {
|
||||||
return WiFiRetryPhase::RETRY_HIDDEN;
|
return WiFiRetryPhase::RETRY_HIDDEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user