diff --git a/components/bt/host/nimble/nimble b/components/bt/host/nimble/nimble index 8a8585ac0bcf..bc55a00e0d78 160000 --- a/components/bt/host/nimble/nimble +++ b/components/bt/host/nimble/nimble @@ -1 +1 @@ -Subproject commit 8a8585ac0bcf41331e022df8e413c3586d731bfb +Subproject commit bc55a00e0d7830043718efed56af15168bb27e6b diff --git a/examples/bluetooth/nimble/throughput_app/bleprph_throughput/main/main.c b/examples/bluetooth/nimble/throughput_app/bleprph_throughput/main/main.c index 0d66133220c3..9c78b7726832 100644 --- a/examples/bluetooth/nimble/throughput_app/bleprph_throughput/main/main.c +++ b/examples/bluetooth/nimble/throughput_app/bleprph_throughput/main/main.c @@ -185,14 +185,14 @@ notify_task(void *arg) /* Check if the MBUFs are available */ if (os_msys_num_free() >= MIN_REQUIRED_MBUF) { - om = ble_hs_mbuf_from_flat(payload, sizeof(payload)); - if (om == NULL) { - /* Memory not available for mbuf */ - ESP_LOGE(tag, "No MBUFs available from pool, retry.."); - vTaskDelay(100 / portTICK_PERIOD_MS); + do { om = ble_hs_mbuf_from_flat(payload, sizeof(payload)); - assert(om != NULL); - } + if (om == NULL) { + /* Memory not available for mbuf */ + ESP_LOGE(tag, "No MBUFs available from pool, retry.."); + vTaskDelay(100 / portTICK_PERIOD_MS); + } + } while (om == NULL); rc = ble_gatts_notify_custom(conn_handle, notify_handle, om); if (rc != 0) {