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 presence messages ending an in-progress sync #319

Merged
merged 1 commit into from
Jul 18, 2016

Conversation

SimonWoolf
Copy link
Member

Issue reported by Larry where a large room would occasionally show far too few presence members (within a region - separate from inter-region sync issues). Turns out that a presence message arriving in the middle of a sync would interrupt the sync.

(I reused the broadcast parameter from setPresence, since it wasn't actually used anywhere in the function. I'm assuming it's leftover from some previous design for presence and is now defunct)

@mattheworiordan
Copy link
Member

LGTM

@@ -1426,5 +1426,67 @@ define(['ably', 'shared_helper', 'async'], function(Ably, helper, async) {
});
};

/*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we maybe include tests where the mid-sync message is one of the sync'd members, including both the case that the sync for that member was received already, and the case that it is yet to be received?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, we should, and we do need more tests for sync. Not directly relevant to this change, so since we're about to change how syncing works for the 0.9 spec, I'll add some more sync tests then.

@paddybyers
Copy link
Member

LGTM with a comment

@SimonWoolf SimonWoolf merged commit e1932ff into master Jul 18, 2016
SimonWoolf added a commit that referenced this pull request Jul 18, 2016
@SimonWoolf SimonWoolf deleted the presence-sync-betwixt branch October 11, 2017 08:35
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.

3 participants