Skip to content

Commit

Permalink
Fix removePeripheralsFromCache to iterate the right things. (#26670)
Browse files Browse the repository at this point in the history
We're using the things we get out of the iterator as keys into the cache; these
are not the values.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Jan 12, 2024
1 parent 93233a2 commit 4528424
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/platform/Darwin/BleConnectionDelegateImpl.mm
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ - (void)removePeripheralFromCache:(CBPeripheral *)peripheral

- (void)removePeripheralsFromCache
{
for (CBPeripheral * peripheral in [_cachedPeripherals allValues]) {
for (CBPeripheral * peripheral in [_cachedPeripherals allKeys]) {
[self removePeripheralFromCache:peripheral];
}
}
Expand Down

0 comments on commit 4528424

Please sign in to comment.