From 157d12ef10e4a787abfb14389c00b1036b4950d0 Mon Sep 17 00:00:00 2001 From: Himanshu Rawat Date: Tue, 25 Feb 2025 12:43:41 -0800 Subject: Conclude direct connection requests on connection failure The connection manager removes the pending connection requests for a device when GATT informs that the connection attempt has concluded. If the connection attempt fails, GATT does not inform the connection manager. As a result, subsequent direct connection attempt requests from the same connection manager clients are rejected. Change-Id: I6025a80eb9fcf85e8d47aa0e21077c1cc10c02b7 Test: mmm packages/modules/Bluetooth Flag: EXEMPT bugfix Bug: 394614729 --- system/stack/gatt/gatt_main.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/system/stack/gatt/gatt_main.cc b/system/stack/gatt/gatt_main.cc index b89327f93d..56d268422c 100644 --- a/system/stack/gatt/gatt_main.cc +++ b/system/stack/gatt/gatt_main.cc @@ -497,6 +497,7 @@ static void gatt_le_connect_cback(uint16_t /* chan */, const RawAddress& bd_addr if (p_tcb != nullptr) { bluetooth::shim::arbiter::GetArbiter().OnLeDisconnect(p_tcb->tcb_idx); } + connection_manager::on_connection_complete(bd_addr); gatt_cleanup_upon_disc(bd_addr, static_cast(reason), transport); return; } -- cgit v1.2.3-59-g8ed1b