From 321b00143dd2a00bafcc338699fb5bec54c5e2c0 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 9 Aug 2026 17:34:33 -0500 Subject: [PATCH] Address review: latch the retry only for the current subscriber A gate-refused send to a peer that is not api_connection_ (the subscribe-time path during a handover) must not arm a retry that loop() would aim at a different connection. --- esphome/components/bluetooth_proxy/bluetooth_proxy.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/esphome/components/bluetooth_proxy/bluetooth_proxy.cpp b/esphome/components/bluetooth_proxy/bluetooth_proxy.cpp index d140ea35ed..0a16567549 100644 --- a/esphome/components/bluetooth_proxy/bluetooth_proxy.cpp +++ b/esphome/components/bluetooth_proxy/bluetooth_proxy.cpp @@ -647,7 +647,8 @@ void BluetoothProxy::send_connections_free() { } void BluetoothProxy::send_connections_free(api::APIConnection *api_connection) { - if (!api_connection->send_message(this->connections_free_response_)) { + // Latch only for the current subscriber: loop() resends to api_connection_. + if (!api_connection->send_message(this->connections_free_response_) && api_connection == this->api_connection_) { // V like the api layer's own buffer-full log: a D would ride the same // full connection. ESP_LOGV(TAG, "Connections-free update deferred, TCP buffer full");