mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-07 13:22:37 +00:00
gap: ignore gap_disconnect if already disconnected
This commit is contained in:
parent
e3012924eb
commit
7fd7aa6f98
@ -4327,6 +4327,10 @@ uint8_t gap_disconnect(hci_con_handle_t handle){
|
|||||||
hci_emit_disconnection_complete(handle, 0);
|
hci_emit_disconnection_complete(handle, 0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
// ignore if already disconnected
|
||||||
|
if (conn->state == RECEIVED_DISCONNECTION_COMPLETE){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
conn->state = SEND_DISCONNECT;
|
conn->state = SEND_DISCONNECT;
|
||||||
hci_run();
|
hci_run();
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user