1
0
mirror of https://github.com/esphome/esphome.git synced 2025-04-13 06:10:30 +01:00

Fix end_of_scan_ not being called while disconnecting (#8328)

This commit is contained in:
J. Nick Koston 2025-02-27 17:56:55 +00:00 committed by GitHub
parent 3048f303c5
commit 28f283d545
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -176,9 +176,9 @@ void ESP32BLETracker::loop() {
https://github.com/espressif/esp-idf/issues/6688
*/
if (!connecting && !disconnecting && xSemaphoreTake(this->scan_end_lock_, 0L)) {
if (!connecting && xSemaphoreTake(this->scan_end_lock_, 0L)) {
if (this->scan_continuous_) {
if (!promote_to_connecting && !this->scan_start_failed_ && !this->scan_set_param_failed_) {
if (!disconnecting && !promote_to_connecting && !this->scan_start_failed_ && !this->scan_set_param_failed_) {
this->start_scan_(false);
} else {
// We didn't start the scan, so we need to release the lock