Skip to content

Commit

Permalink
do not disconnect if discover fail
Browse files Browse the repository at this point in the history
This line was trying to disconnect when the phone changed security before the connection was valid and therefore crashing
  • Loading branch information
ldab committed Jul 9, 2024
1 parent ac1385b commit 5ded1f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/applications/lea_assistant/broadcast_assistant.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ static void security_changed_cb(struct bt_conn *conn, bt_security_t level, enum
/* Connected. Do BAP broadcast assistant discover */
LOG_INF("Broadcast assistant discover");
err = bt_bap_broadcast_assistant_discover(ba_sink_conn);
if (err) {
if (false) { // do not disconnect
LOG_ERR("Broadcast assistant discover (err %d)", err);
err = bt_conn_disconnect(ba_sink_conn, BT_HCI_ERR_REMOTE_USER_TERM_CONN);
if (err) {
Expand Down

0 comments on commit 5ded1f3

Please sign in to comment.