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

[stable16] Fix joining call before joining room after forced reconnection with external signaling #1850

Merged
merged 2 commits into from
May 24, 2019

Conversation

backportbot-nextcloud[bot]
Copy link

backport of #1847

When the external signaling server is used "joinCall()" does not join
the call if its room has not been joined first. However, when that
happens, the call is automatically joined later once the room has been
joined. In that case the same flags given when "joinCall()" was called
should be used once the call is actually joined; otherwise, if no flags
are provided, the default flags would be used by the server, which may
not match the real call flags.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
When the external signaling server is used, after successfully sending a
"joinRoom" message to the Nextcloud server a message is sent too the
external signaling server (Standalone._joinRoomSuccess); this registers
the Nextcloud session in the signaling server, and is needed by the
signaling server to be able to properly process further messages from
that session.

Joining a call requires that the Nextcloud session is registered, so
"joinCall()" is queued until joining the room if called before that;
whether the session is registered or not is tracked with
"signalingRoomJoined".

When a reconnection is forced the room is joined again and, if the
participant was in a call, the call is joined again. As the Nextcloud
session changed the call should not be joined until the new session is
registered again. However, as "signalingRoomJoined" was emptied only in
"leaveRoom()" and this is not called in a forced reconnection its value
still matched the room token, so the call was immediately joined after a
reconnection without properly waiting for the session to be registered.
Due to this the external signaling server could received the message to
join the call after or before the session was registered (depending on
how fast the messages were sent and processed), and thus the call was
properly joined or not depending on the case.

In the external signaling server the Nextcloud session is unregistered
when the "bye" message is received, so for parallelism with that
behaviour "signalingRoomJoined" is now emptied too when sending the
"bye" message (instead of explicitly emptying it only for forced
reconnections).

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
@Ivansss Ivansss merged commit 7c45dad into stable16 May 24, 2019
@Ivansss Ivansss deleted the backport/1847/stable16 branch May 24, 2019 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug feature: frontend 🖌️ "Web UI" client feature: signaling 📶 Internal and external signaling backends
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants