Skip to content

Commit ef4172c

Browse files
committed
Check characteristic handles before fetching descriptors.
1 parent c0d1ce0 commit ef4172c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/NimBLERemoteCharacteristic.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,10 @@ bool NimBLERemoteCharacteristic::retrieveDescriptors(const NimBLEUUID *uuid_filt
269269
}
270270
}
271271

272+
if (m_handle == m_endHandle) {
273+
return true;
274+
}
275+
272276
desc_filter_t filter = {uuid_filter, &taskData};
273277

274278
rc = ble_gattc_disc_all_dscs(getRemoteService()->getClient()->getConnId(),

0 commit comments

Comments
 (0)