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

Only forward sync state messages with a more recent timestamp #259

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

paulsonnentag
Copy link
Collaborator

@paulsonnentag paulsonnentag commented Dec 13, 2023

When the RemoteHeadsSubscription object receives a remote head event, it checks if the timestamp is older than the remote heads to avoid forwarding old remote heads. The problem is that if the timestamp is equal, it would also forward the remote heads. In standalone TEE, this would lead to an infinite loop of remote heads being forwarded if one document was open in the same browser on multiple tabs. This pull request fixes this so peers only forward the sync state if it's more recent.

@alexjg alexjg merged commit c4adefc into main Dec 13, 2023
1 check passed
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.

2 participants