Skip to content

Commit

Permalink
fix(nimble): Fixed assert issue in proximity_sensor example
Browse files Browse the repository at this point in the history
  • Loading branch information
rahult-github committed Aug 5, 2024
1 parent 0c03c20 commit 6226780
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2017-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2017-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -183,12 +183,14 @@ ble_prox_prph_gap_event(struct ble_gap_event *event, void *arg)
event->connect.status == 0 ? "established" : "failed",
event->connect.status);

/* resume advertising */
if (event->connect.status != 0) {
/* Connection failed, resume advertising */
#if CONFIG_EXAMPLE_EXTENDED_ADV
ext_ble_prox_prph_advertise();
ext_ble_prox_prph_advertise();
#else
ble_prox_prph_advertise();
ble_prox_prph_advertise();
#endif
}
break;

case BLE_GAP_EVENT_DISCONNECT:
Expand Down

0 comments on commit 6226780

Please sign in to comment.