Skip to content

Commit 4d336bb

Browse files
committed
Check characteristic handles before fetching descriptors.
1 parent e4b8c36 commit 4d336bb

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
@@ -266,6 +266,10 @@ bool NimBLERemoteCharacteristic::retrieveDescriptors(const NimBLEUUID *uuid_filt
266266
}
267267
}
268268

269+
if (m_handle == m_endHandle) {
270+
return true;
271+
}
272+
269273
desc_filter_t filter = {uuid_filter, &taskData};
270274

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

0 commit comments

Comments
 (0)