1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 14:43:51 +00:00

Merge branch 'busy_disconnect_loop' into integration

This commit is contained in:
J. Nick Koston
2025-07-05 11:12:06 -05:00

View File

@@ -175,7 +175,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();
}
}