samples: mgmt: mcumgr: smp_svr: Fix re-advertise issue on connection
Fixes an issue introduced with commit
c6ad4a7927 which wrong restarts
advertising after a device connects when it should only restart
advertising if a device fails to connect
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
parent
830c1f8134
commit
655be99fa7
1 changed files with 1 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue