Skip to content

Conversation

@backportbot-nextcloud
Copy link

@backportbot-nextcloud backportbot-nextcloud bot commented Aug 26, 2022

  • ⚠️ This backport had conflicts and is incomplete

backport of #7799

When a call is left the UI always changes to the "not-in-a-call" state.
However, if leaving the call fails the signaling did not emit the
"leaveCall" event, so the WebRTC connections were not stopped due to
leaving the call, nor they were left later when the signaling sent the
updated list of participants, as the participant did not leave the call
from the point of view of the server.

Even if leaving the call fails in the server the call should be locally
left when the user requests it, so now "leaveCall" is emitted even if
leaving the call failed.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
When "usersChanged(signaling, [], previousUsersInRoom)" is called
"previousUsersInRoom" is assigned to the difference with itself and,
therefore, to an empty array, so there is no need to explicitly do it
afterwards.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
When a call is left the peer connections are immediately ended. However,
the data of the participants (like the call state), the
CallParticipantModels as well as the timers to retry failed connections
were cleared once the signaling message updating the current participant
state to disconnected was received. If leaving the call failed in the
server that message will not be received, so pending connections were
retried even if no longer in the call, and when joining again a previous
model could be reused, leading to different issues.

Due to that the call related data is now immediately cleared when the
call is left, no matter if the signaling message about leaving the call
is then received or not (and, if it is, nothing will happen as the data
was already cleared).

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
When a participant was not in the call but received an offer it was
ignored to avoid establishing a connection. However, all the other call
signaling messages were still processed. Due to this, if a participant
leaves the call but that fails in the server that participant still
receives all the participant updates (which also list that participant
as still in the call) and therefore that participant tries to establish
a connection with the other participants.

To prevent that now all call signaling messages are ignored when the
local participant is not in the call. Due to this the call signaling
message that changes the state from the local participant to
disconnected is now ignored as well, although that should not be a
problem given that (since the previous commmit) the call related data is
immediately cleared when the call is left, without waiting for the
signaling message.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
@danxuliu danxuliu force-pushed the backport/7799/stable23 branch from fe84aed to fbb0b81 Compare August 26, 2022 14:39
Copy link
Member

@danxuliu danxuliu left a comment

Choose a reason for hiding this comment

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

Tested and works 👍

@danxuliu danxuliu merged commit 73863bd into stable23 Aug 26, 2022
@danxuliu danxuliu deleted the backport/7799/stable23 branch August 26, 2022 15:20
This was referenced Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants