Fix slower active users not included in user list returned by signaling #1534
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.
Follow up to #1522
When a user requests the signaling messages from the internal signaling server first the last ping of the user is updated. Then, after waiting for at most 30 seconds, the list of users active in the room is returned.
That list was based on the users whose last ping happened around 30 seconds ago or less (it could be a bit longer than 30 seconds, but the described problem remains in that case too); if other user pulled the messages slightly before the current user and that other user did not pull the messages again (or the chat messages, as that updates the last ping too) before the user list was returned that other user was not included in the list, as her last ping happened more than 30 seconds ago.
Now the elapsed time since the last ping for users returned in the list is longer than the timeout used for pulling messages (and chat messages) to ensure (up to a point) that active users will be included in the list even if it took a bit longer for them to pull messages again.
Unfortunately I have not found any easy and consistent way to reproduce the bug, so I can not provide a step by step testing scenario, except for "leave a call between two peers running for a lot of time until the bug happens" :-(