Bluetooth: Host: Free ISO TX context
When disconnected while sending data, if ISO doesn't get the number of completed packets it will not call `process_unack_tx` and thus will leak TX context. Fix that by setting the connection state in ISO disconnection which will trigger a call to `process_unack_tx`. Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
This commit is contained in:
parent
2bdf2b7cc3
commit
70696f5b0f
1 changed files with 1 additions and 0 deletions
|
@ -431,6 +431,7 @@ static void bt_iso_chan_disconnected(struct bt_iso_chan *chan, uint8_t reason)
|
|||
__ASSERT(chan->iso != NULL, "NULL conn for iso chan %p", chan);
|
||||
|
||||
bt_iso_chan_set_state(chan, BT_ISO_STATE_DISCONNECTED);
|
||||
bt_conn_set_state(chan->iso, BT_CONN_DISCONNECT_COMPLETE);
|
||||
|
||||
/* The peripheral does not have the concept of a CIG, so once a CIS
|
||||
* disconnects it is completely freed by unref'ing it
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue