mirror of
https://github.com/esphome/esphome.git
synced 2026-08-22 22:26:21 +00:00
Clear the scan-end skip on every promotion
This commit is contained in:
@@ -567,8 +567,6 @@ void ESP32BLETracker::try_promote_discovered_clients_() {
|
||||
|
||||
if (this->scanner_state_ == ScannerState::RUNNING) {
|
||||
ESP_LOGD(TAG, "Stopping scan to make connection");
|
||||
// A connect ends the scan period a window-change restart was continuing.
|
||||
this->skip_next_scan_end_ = false;
|
||||
this->stop_scan_();
|
||||
// Don't wait for scan stop complete - promote immediately.
|
||||
// This is safe because ESP-IDF processes BLE commands sequentially through its internal mailbox queue.
|
||||
@@ -577,6 +575,8 @@ void ESP32BLETracker::try_promote_discovered_clients_() {
|
||||
}
|
||||
|
||||
ESP_LOGD(TAG, "Promoting client to connect");
|
||||
// A connect ends the scan period a window-change restart was continuing.
|
||||
this->skip_next_scan_end_ = false;
|
||||
#ifdef USE_ESP32_BLE_SOFTWARE_COEXISTENCE
|
||||
this->update_coex_preference_(true);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user