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: queue sync1 message and handle it after ydoc is loaded #445

Merged
merged 1 commit into from
Aug 13, 2023

Conversation

lihebi
Copy link
Collaborator

@lihebi lihebi commented Aug 13, 2023

Loading persisted ydoc takes time, and if SyncStep1 is sent/received before ydoc is ready, the message is discarded, causing provider.synced event never being fired.

This PR adds messages to a queue and processes them after ydoc is loaded from persistence. Ref: yjs/y-websocket#81 (comment)

@lihebi lihebi marked this pull request as ready for review August 13, 2023 18:03
@lihebi lihebi merged commit 5a2ec13 into codepod-io:main Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant