Check the cache-clean status in release_services()

The one IDF call in the backend that skipped check_and_log_error_. A
failed clean leaves a stale database the next connection could serve as
authoritative, with nothing in the log to point at it. (The call fails
only at dispatch - stack down - not for an empty cache, so this cannot
warn-spam routine teardowns.)
This commit is contained in:
J. Nick Koston
2026-08-09 15:57:20 -05:00
parent 3728669fa6
commit 0ac9a0f8bd
@@ -301,7 +301,9 @@ void BluedroidGattClient::release_services() {
// Always set: terminates any in-flight stream on every cache config.
this->services_released_ = true;
#ifndef CONFIG_BT_GATTC_CACHE_NVS_FLASH
esp_ble_gattc_cache_clean(this->remote_bda_);
// A failed clean leaves a stale database the next connection could serve
// as authoritative; make it visible like every other IDF call here.
this->check_and_log_error_("esp_ble_gattc_cache_clean", esp_ble_gattc_cache_clean(this->remote_bda_));
#endif
}