mirror of
https://github.com/esphome/esphome.git
synced 2025-07-28 14:16:40 +00:00
Fix bluetooth proxy busy loop when disconnecting pending BLE connections (#9332)
This commit is contained in:
parent
492580edc3
commit
a303f93236
@ -170,7 +170,7 @@ int BluetoothProxy::get_bluetooth_connections_free() {
|
||||
void BluetoothProxy::loop() {
|
||||
if (!api::global_api_server->is_connected() || this->api_connection_ == nullptr) {
|
||||
for (auto *connection : this->connections_) {
|
||||
if (connection->get_address() != 0) {
|
||||
if (connection->get_address() != 0 && !connection->disconnect_pending()) {
|
||||
connection->disconnect();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user