mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-01 10:13:29 +00:00
gap: fix gap_connect_cancel right after gap_connect
This commit is contained in:
parent
80818de8ff
commit
10f8f46905
@ -5503,6 +5503,7 @@ uint8_t gap_connect_cancel(void){
|
||||
switch (conn->state){
|
||||
case SEND_CREATE_CONNECTION:
|
||||
// skip sending create connection and emit event instead
|
||||
hci_stack->le_connecting_request = LE_CONNECTING_IDLE;
|
||||
hci_emit_le_connection_complete(conn->address_type, conn->address, 0, ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER);
|
||||
btstack_linked_list_remove(&hci_stack->connections, (btstack_linked_item_t *) conn);
|
||||
btstack_memory_hci_connection_free( conn );
|
||||
|
Loading…
x
Reference in New Issue
Block a user