Bluetooth: ATT: Notify if a disconnect happen while a request is pending
If the client is waiting for a response but the link is disconnected it should be notified as the request may never be complete otherwise. Change-Id: I1fb83b63d8effb4ef2a8f838566c1e68deae9f2c Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
52caf8cfc8
commit
b50a582ea1
1 changed files with 3 additions and 0 deletions
|
@ -1659,6 +1659,9 @@ static void bt_att_disconnected(struct bt_l2cap_chan *chan)
|
|||
|
||||
BT_DBG("chan %p cid 0x%04x", chan, chan->tx.cid);
|
||||
|
||||
/* Notify client if request is pending */
|
||||
att_handle_rsp(att, NULL, 0, BT_ATT_ERR_UNLIKELY);
|
||||
|
||||
bt_gatt_disconnected(chan->conn);
|
||||
memset(att, 0, sizeof(*att));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue