Avoid creating a new espbt::ESPBTUUID each loop when registering for notify (#4069)

This commit is contained in:
J. Nick Koston 2022-11-22 14:46:59 -06:00 committed by GitHub
parent fef60e335e
commit 1f33ad037d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -299,7 +299,7 @@ BLEDescriptor *BLEClientBase::get_config_descriptor(uint16_t handle) {
auto *chr = this->get_characteristic(handle);
if (chr != nullptr) {
for (auto &desc : chr->descriptors) {
if (desc->uuid == espbt::ESPBTUUID::from_uint16(0x2902))
if (desc->uuid.get_uuid().uuid.uuid16 == 0x2902)
return desc;
}
}