Hi,
We are using nRF5340 DK and the nRF Connect SDK Version 2.6.1.
We are experiencing an issue with disconnections. We use bt_conn_ref()
when receiving the connected event and bt_conn_unref()
when receiving the disconnection event.
However, sometimes after a disconnection, when we retry, we encounter the error: "bt_conn: bt_conn_exists_le: Found valid connection (0x20001a18) with address FF:F5:55:5A:D6:6A (random) in disconnected state".
Why does this issue occur even after the disconnection event has been processed?
If we call bt_conn_unref()
twice during the disconnection event as shown in the below code (essentially incrementing once upon connection and decrementing twice upon disconnection), the issue does not occur.
Could this behavior be due to an internal counter issue?