1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-15 07:08:20 +00:00

Apply suggestions from code review

This commit is contained in:
J. Nick Koston 2025-02-21 18:39:08 -06:00 committed by GitHub
parent 70ad2867dd
commit e952f0e8c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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