fix for realtime calling subscription multiple time - Appwrite 1.4.x#713
Closed
lohanidamodar wants to merge 6 commits into
Closed
fix for realtime calling subscription multiple time - Appwrite 1.4.x#713lohanidamodar wants to merge 6 commits into
lohanidamodar wants to merge 6 commits into
Conversation
stnguyen90
reviewed
Sep 12, 2023
| await _closeConnection(); | ||
| } | ||
| }); | ||
| _subscriptions[counter] = subscription; |
Contributor
There was a problem hiding this comment.
I think using a counter can lead to problems. For example:
- start (counter = 0, subscriptions map is empty)
- subscribe() (counter = 1, subscriptions[0] is set)
- subscribe() (counter = 2, subscriptions[0] and [1] are set)
- the first one gets removed (counter = 1, subscriptions[1] is set)
- a new subscription added (counter = 2, subscriptions[1] is set and replaces the subscription from step 2)
Member
Author
There was a problem hiding this comment.
Thanks, I've updated to use the time in microseconds to overcome this. please let me know what you think.
lohanidamodar
force-pushed
the
fix-flutter-realtime-multisub
branch
from
March 14, 2024 02:11
ab42f8c to
a79c32e
Compare
Contributor
|
Closing as this is no longer needed. It has been added in later versions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Test Plan
Related PRs and Issues
Have you read the Contributing Guidelines on issues?
YES