diff --git a/samples/subsys/mgmt/mcumgr/smp_svr/src/bluetooth.c b/samples/subsys/mgmt/mcumgr/smp_svr/src/bluetooth.c index 7c5723bf999f29..477494b9c24dd1 100644 --- a/samples/subsys/mgmt/mcumgr/smp_svr/src/bluetooth.c +++ b/samples/subsys/mgmt/mcumgr/smp_svr/src/bluetooth.c @@ -43,11 +43,10 @@ static void connected(struct bt_conn *conn, uint8_t err) { if (err) { LOG_ERR("Connection failed, err 0x%02x %s", err, bt_hci_err_to_str(err)); + k_work_submit(&advertise_work); } else { LOG_INF("Connected"); } - - k_work_submit(&advertise_work); } static void disconnected(struct bt_conn *conn, uint8_t reason)