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

[ECO-4875] fix: out of sync message handlers #537

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

ttypic
Copy link
Contributor

@ttypic ttypic commented Aug 5, 2024

Resolves #531

Makes StreamsChannel#_lastId field static, because:

During hot reloading, the Ably instance can be recreated. StreamsChannel#_lastId field is used to create IDs for platform-specific subscriptions, which are used on iOS and Android. Code that used to register subscription handler is a singleton, so two Ably instances overwrite each other, causing the platform implementation to be out of sync with the Flutter message handler.

@github-actions github-actions bot temporarily deployed to staging/pull/537/features August 5, 2024 09:09 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/537/dartdoc August 5, 2024 09:09 Inactive
Makes `StreamsChannel#_lastId` field static, because:

During hot reloading, the Ably instance can be recreated. `StreamsChannel#_lastId` field is used to create IDs for platform-specific subscriptions, which are used on iOS and Android. Code that used to register subscription handler is a singleton, so two Ably instances overwrite each other, causing the platform implementation to be out of sync with the Flutter message handler.
@ttypic ttypic merged commit 5b5d300 into main Aug 5, 2024
5 of 8 checks passed
@ttypic ttypic deleted the ECO-4875/out-of-sync-message-handler branch August 5, 2024 17:40
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.

Fatal error after network connection issues
2 participants