From 0ce25115e90dc847a29d564aa82d6710961dac4e Mon Sep 17 00:00:00 2001 From: Jacky Cheung Date: Wed, 10 May 2017 14:23:06 -0700 Subject: [PATCH] DO NOT MERGE ANYWHERE Check ACL link on non-opportunistic connection creation At the time of connection, the idle timeout could have been set to a fixed value, which is likely to be related to the completion of service discovery after bonding. A check on ACL link allows the idle timeout to be reset to no timeout, which would eliminate local host disconnections observed due to idle timeouts. Bug: 37352720 Test: manual Change-Id: Ie0b24b83020d502cf7c55421a27659215253b4d2 --- stack/gatt/gatt_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack/gatt/gatt_main.c b/stack/gatt/gatt_main.c index 4f1568a95..d8251daa4 100644 --- a/stack/gatt/gatt_main.c +++ b/stack/gatt/gatt_main.c @@ -398,7 +398,7 @@ BOOLEAN gatt_act_connect (tGATT_REG *p_reg, BD_ADDR bd_addr, if (ret) { if (!opportunistic) - gatt_update_app_use_link_flag(p_reg->gatt_if, p_tcb, TRUE, FALSE); + gatt_update_app_use_link_flag(p_reg->gatt_if, p_tcb, TRUE, TRUE); else GATT_TRACE_DEBUG("%s: connection is opportunistic, not updating app usage", __func__); -- 2.11.0