Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: iOS hot-restart issue with active listeners #26

Merged
merged 1 commit into from
Jul 31, 2020

Conversation

tiholic
Copy link
Contributor

@tiholic tiholic commented Jul 31, 2020

Dropping key from streams dict while enumerating - [err: Collection was mutated while being enumerated]
Fixed by using a mutableCopy of _streams

Dropping key from streams dict while enumerating - [err: Collection was mutated while being enumerated]
Fixed by using a `mutableCopy` of `_streams`
Copy link
Member

@paddybyers paddybyers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@tiholic tiholic merged commit 0b0872e into main Jul 31, 2020
@tiholic tiholic deleted the feature/hot-restart-hotfix branch July 31, 2020 08:04
@@ -99,7 +99,7 @@ - (void)setStreamHandlerFactory:(NSObject<FlutterStreamHandler> *(^)(id))factory
}

- (void) reset{
for (NSString* key in _streams) {
for (NSString* key in [_streams mutableCopy]) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this has been merged but, fwiw, that could just be copy as it's not needed to be mutable. Cosmetic, admittedly. 😁

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@QuintinWillison Good to know there is an immutable copy for dicts 😄

Addressed at efc5104 in PR #20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants