mirror of
https://github.com/esphome/esphome.git
synced 2024-11-14 02:58:11 +01:00
Fix missing conn_id check in bluetooth_proxy disconnect event
Pointed out by @elupus while debugging https://github.com/home-assistant/core/issues/103117
This commit is contained in:
parent
655dbc48b5
commit
dd346263f3
1 changed files with 2 additions and 0 deletions
|
@ -20,6 +20,8 @@ bool BluetoothConnection::gattc_event_handler(esp_gattc_cb_event_t event, esp_ga
|
|||
|
||||
switch (event) {
|
||||
case ESP_GATTC_DISCONNECT_EVT: {
|
||||
if (param->disconnect.conn_id != this->conn_id_)
|
||||
break;
|
||||
this->proxy_->send_device_connection(this->address_, false, 0, param->disconnect.reason);
|
||||
this->set_address(0);
|
||||
this->proxy_->send_connections_free();
|
||||
|
|
Loading…
Reference in a new issue