Clear the scan-end skip when a connect stops the scan

This commit is contained in:
J. Nick Koston
2026-08-21 18:37:13 -05:00
parent 8886ff5ba6
commit 8faecc7269
@@ -566,6 +566,8 @@ 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.