1
0
mirror of https://github.com/esphome/esphome.git synced 2025-04-16 07:40:29 +01:00

Merge remote-tracking branch 'origin/fix_disconnect_while_connecting' into fix_disconnect_while_connecting

This commit is contained in:
J. Nick Koston 2025-02-21 18:54:31 -06:00
commit 478c9851b3
No known key found for this signature in database

View File

@ -206,7 +206,7 @@ bool BLEClientBase::gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_
break;
}
if (this->state_ == espbt::ClientState::DISCONNECTING) {
// Disconnect was requested before after connecting started,
// Disconnect was requested after connecting started,
// but before the connection was established. Now that we have
// this->conn_id_ set, we can disconnect it.
this->_unconditional_disconnect_();
@ -233,7 +233,7 @@ bool BLEClientBase::gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_
return false;
this->log_event_("ESP_GATTC_CONNECT_EVT");
if (this->state_ == espbt::ClientState::DISCONNECTING) {
// Disconnect was requested before after connecting started,
// Disconnect was requested after connecting started,
// but before the connection was established. Now that we have
// this->conn_id_ set, we can disconnect it.
this->_unconditional_disconnect_();