Skip to content

Commit 4528424

Browse files
bzbarsky-applepull[bot]
authored andcommitted
Fix removePeripheralsFromCache to iterate the right things. (#26670)
We're using the things we get out of the iterator as keys into the cache; these are not the values.
1 parent 93233a2 commit 4528424

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/platform/Darwin/BleConnectionDelegateImpl.mm

+1-1
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ - (void)removePeripheralFromCache:(CBPeripheral *)peripheral
698698

699699
- (void)removePeripheralsFromCache
700700
{
701-
for (CBPeripheral * peripheral in [_cachedPeripherals allValues]) {
701+
for (CBPeripheral * peripheral in [_cachedPeripherals allKeys]) {
702702
[self removePeripheralFromCache:peripheral];
703703
}
704704
}

0 commit comments

Comments
 (0)