From f300012bcd8b1854fdfe3cfb3ca66986e5b85b8b Mon Sep 17 00:00:00 2001 From: Qin Wang Date: Tue, 18 Apr 2023 17:21:20 -0700 Subject: [PATCH] Fix GATT DiscoverServiceAndCharacteristics PiperOrigin-RevId: 525295071 --- internal/platform/implementation/windows/ble_gatt_client.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/platform/implementation/windows/ble_gatt_client.cc b/internal/platform/implementation/windows/ble_gatt_client.cc index 9bfb6b02..809dff7f 100644 --- a/internal/platform/implementation/windows/ble_gatt_client.cc +++ b/internal/platform/implementation/windows/ble_gatt_client.cc @@ -213,10 +213,11 @@ bool BleGattClient::DiscoverServiceAndCharacteristics( // found all characteristics. NEARBY_LOGS(VERBOSE) << __func__ << ": Found all characteristics."; - break; + return true; } - return true; + NEARBY_LOGS(VERBOSE) << __func__ + << ": Failed to find service and all characteristics."; } catch (std::exception exception) { NEARBY_LOGS(ERROR) << __func__ << ": Failed to get GATT services. exception: "