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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ios/Classes/AblyStreamsChannel.m
Original file line number Diff line number Diff line change
Expand Up @@ -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

AblyStreamsChannelStream *stream = _streams[key];
[stream.handler onCancelWithArguments:nil];
[_streams removeObjectForKey:key];
Expand Down