fix (2.6): enhancements over disconnection situation (delay to remove and show ejected reason) #15544
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.
Problem 1:
When the user is ejected due to inactivity, a generic error is being showed.


And there is a random behavior where sometimes the user see the first print and sometimes the second.
This PR will show the properly reason why he was removed:

Problem 2:
When the user has problem with disconnection. When the connection is re-established he can't join to the meeting again!
He is immediately removed once he connects to the server!
removed_from_meeting.mp4
With this PR this situation will be avoided once the user will have 3 seconds to try to re-establish the connection before being removed from the meeting:
connection_re-established.mp4
When user is ejected by the system, he is updated with the following props:
{ejected: true, ejectedReason: 'user_inactivity_eject_reason'}
It would take the user to the
meeting-ended
screen.But the user is also REMOVED from the
Users
collection.And it makes the user identify that he was removed and take the user to the
error-screen
with403
code.Sometimes the first option is faster, and sometimes the second one is faster.
It will stop happening once the second option will have a delay of 3 seconds where client can identify the
ejected:true
and show the right screenmeeting-ended
.Moreover: Now the
meeting-ended
will check if there is an error msg for theejectedReason
that the user received! And show the reason message in this cases!When the user loses connection with the server, he firstly is updated with the
userLeftFlag
. And after 10 seconds he is removed from theUsers
collection.Once the user can establish a connection with the server again, he would try authenticate again.
But at the same time he received the updated
Users
collection and check that he is not in the list anymore! And immediately call the functionendMeeting()
without having time to try to authenticate (and join meeting) again!With this PR there will be a delay of 3 seconds before call the
endMeeting()
and the user is able to rejoin the meeting during this time and avoid the "You were removed" error.A refactor of this part in order to avoid this random behavior is welcome! Let's prioritize it for BBB 2.7 release!
PS: A thorough test/review will be appreciated. Once this part is sensitive and this change can possibly trigger some side effect.

Once the observer that call
endMeeting()
immediately when user is removed was introduced a long time ago (2.3-alpha-3) and remain working until now.. #10369Closes #15527