bluekitchen / btstack

Dual-mode Bluetooth stack, with small memory footprint.
http://bluekitchen-gmbh.com
Other
1.74k stars 613 forks source link

hci: fix hci connection release on cancel #593

Closed ebmmy closed 6 months ago

ebmmy commented 6 months ago

If the LE connection is aborted by the user, the HCI connection is not released after receiving the LE connection complete event. This is caused by the conn pointer being null because the connection complete event does not contain an address in this case. It used to work because the current outgoing connection was always assigned to the conn pointer. This has changed in commit 9fd274a.

mringwal commented 6 months ago

Thanks for this. I've moved the 'get outgoing connection' a bit up to execute for cancelled connections only in 4f1a7be.