mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-04 06:39:53 +00:00
hci: avoid double free during halting
This commit is contained in:
parent
f8b1697f9f
commit
8fca890e08
@ -3289,6 +3289,10 @@ static void hci_run(void){
|
||||
hci_con_handle_t con_handle = (uint16_t) connection->con_handle;
|
||||
if (!hci_can_send_command_packet_now()) return;
|
||||
|
||||
// check state
|
||||
if (connection->state == SENT_DISCONNECT) return;
|
||||
connection->state = SENT_DISCONNECT;
|
||||
|
||||
log_info("HCI_STATE_HALTING, connection %p, handle %u", connection, con_handle);
|
||||
|
||||
// cancel all l2cap connections right away instead of waiting for disconnection complete event ...
|
||||
|
Loading…
x
Reference in New Issue
Block a user