Skip to content

Commit

Permalink
Make sure to not mutate a dictionary while we're enumerating it. (#26493
Browse files Browse the repository at this point in the history
)
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Aug 22, 2023
1 parent 608a0c3 commit 4e8ddc2
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) {
for (CBPeripheral * peripheral in [_cachedPeripherals allValues]) {
[self removePeripheralFromCache:peripheral];
}
}
Expand Down

0 comments on commit 4e8ddc2

Please sign in to comment.