diff --git a/subsys/bluetooth/host/hci_core.c b/subsys/bluetooth/host/hci_core.c index b751cb989f14..7320c8e3c68f 100644 --- a/subsys/bluetooth/host/hci_core.c +++ b/subsys/bluetooth/host/hci_core.c @@ -838,6 +838,8 @@ static void hci_disconn_complete_prio(struct net_buf *buf) return; } + conn->err = evt->reason; + bt_conn_set_state(conn, BT_CONN_DISCONNECT_COMPLETE); bt_conn_unref(conn); } @@ -860,8 +862,6 @@ static void hci_disconn_complete(struct net_buf *buf) return; } - conn->err = evt->reason; - bt_conn_set_state(conn, BT_CONN_DISCONNECTED); if (conn->type != BT_CONN_TYPE_LE) {