From 5d8f38cce4e4ceae508c539a3a48d6c057b1f5f8 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 25 Jul 2025 15:58:49 -1000 Subject: [PATCH] cleanup --- esphome/components/bluetooth_proxy/bluetooth_connection.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/esphome/components/bluetooth_proxy/bluetooth_connection.cpp b/esphome/components/bluetooth_proxy/bluetooth_connection.cpp index 8e42ba5951..b4dfb72ab4 100644 --- a/esphome/components/bluetooth_proxy/bluetooth_connection.cpp +++ b/esphome/components/bluetooth_proxy/bluetooth_connection.cpp @@ -119,8 +119,7 @@ void BluetoothConnection::send_service_for_discovery_() { service_result.end_handle, &char_result, &char_count, char_offset); if (char_status == ESP_GATT_INVALID_OFFSET || char_status == ESP_GATT_NOT_FOUND) { break; - } - if (char_status != ESP_GATT_OK) { + } else if (char_status != ESP_GATT_OK) { ESP_LOGE(TAG, "[%d] [%s] esp_ble_gattc_get_all_char error, status=%d", this->connection_index_, this->address_str().c_str(), char_status); break; @@ -156,8 +155,7 @@ void BluetoothConnection::send_service_for_discovery_() { this->gattc_if_, this->conn_id_, char_result.char_handle, &desc_result, &desc_count, desc_offset); if (desc_status == ESP_GATT_INVALID_OFFSET || desc_status == ESP_GATT_NOT_FOUND) { break; - } - if (desc_status != ESP_GATT_OK) { + } else if (desc_status != ESP_GATT_OK) { ESP_LOGE(TAG, "[%d] [%s] esp_ble_gattc_get_all_descr error, status=%d", this->connection_index_, this->address_str().c_str(), desc_status); break;