diff --git a/src/ble/ble_service.c b/src/ble/ble_service.c index e6b54c9..85ab69d 100644 --- a/src/ble/ble_service.c +++ b/src/ble/ble_service.c @@ -412,6 +412,12 @@ static void adv_restart_handler(struct k_work *work) return; } + if ((current_conn != NULL) || ble_connection_st) + { + DBG_CORE("[BLE] Advertising restart skipped (connected)\r\n"); + return; + } + ble_advertising_start(); led_set_state(LED_STATE_ADVERTISING); }