Repository navigation
fix for realtime multiple subscription 15x - #801
Merged
Merged
Conversation
Contributor
|
Sorry, I'll try to get to this on Monday. |
Contributor
|
@lohanidamodar, I think the problem is if you subscribe multiple times in a loop like: try {
final document = await widget.database.listDocuments(
databaseId: ID.custom(databaseId),
collectionId: ID.custom(collectionId), //change your collection id
);
for (var doc in document.documents) {
_subscribe(
['databases.default.collections.usernames.documents.${doc.$id}']);
}
} on AppwriteException catch (e) {
print(e.message);
}This can be called multiple times, creating multiple websockets. In this case 5:
|
stnguyen90
reviewed
Mar 29, 2024
abnegate
reviewed
Apr 8, 2024
abnegate
left a comment
Member
There was a problem hiding this comment.
There's a few places we need to revert back from Appwrite to a template substitution
Member
Author
Updated |
Member
Author
|
@stnguyen90 updated |
stnguyen90
self-requested a review
April 15, 2024 18:28
stnguyen90
reviewed
Apr 16, 2024
do not close subscription if creating socket is true to prevent concurrent modification error
stnguyen90
suggested changes
Apr 18, 2024
stnguyen90
approved these changes
Apr 23, 2024
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
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
Related PRs and Issues
Have you read the Contributing Guidelines on issues?
(Write your answer here.)