Fix forced reconnections when the HPB is not used #7080
Merged
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.
When a forced reconnection is triggered and the HPB is not used there are several race conditions that can prevent the participant from automatically joining the call again, or prevent other participants to establish the connection again with that participant.
First, when the call was joined again it was not waited for the call to be left first, so it could happen that the leave and join request were sent and the join request ended being processed first, so once the leave call request was processed the participant did not join.
Second, if joining the call takes too long the
inCall
property for the participant who is reconnecting could be not in the call when theusersInRoom
signaling message is sent. If that happens the WebUI could understand that as the call having being ended by a moderator and then cause the participant to leave the call, ignoring the response to the join request received later.Finally, if the
inCall
property for the participant who is reconnecting never becomes not in the call other participants would not notice that the participant in fact reconnected (as without HPB the same session ID is used) and then not update their connection with that participant (for example, to stop it if the participant is no longer publishing). -> This will be fixed at a later point.Pending:
How to test (scenario 1)
sleep(5);
beforespreed/lib/Controller/CallController.php
Line 164 in 56d4660
Result with this pull request
The participant in the private window leaves and then automatically joins the call again.
Result without this pull request
The participant in the private window leaves but does not join the call again.
How to test (scenario 2)
sleep(5);
beforespreed/lib/Controller/CallController.php
Line 113 in 56d4660
Result with this pull request
The participant in the private window leaves and then automatically joins the call again.
Result without this pull request
The participant in the private window leaves but does not join the call again. The browser console shows Force leaving the call for current participant.