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

[stable15] Fix peer creation when wrong user list was sent to the other peer #1542

Merged
merged 2 commits into from
Feb 13, 2019

Conversation

backportbot-nextcloud[bot]
Copy link

backport of #1533

In some circumstances (for example, if the signaling server provides an
incorrect list of users) the peer that created the offer can disconnect
from the peer that received the offer without causing the peer that
received the offer to remove the peer that created the offer.

In that situation, if the peer that created the offer then tried to
connect again with the other peer the other peer created a new "Peer"
object that was used instead of the old one. However, as the old one was
not removed, its video element (which was no longer updated) was kept
visible, hiding the video element linked to the new "Peer" object and
making it look frozen.

It is not possible to ensure that the peer that received the offer will
always remove the peer that created the offer if the peer that created
the offer disconnects from the peer that received the offer, so this is
handled instead by removing the stale "Peer" objects when new offers are
received.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
In some circumstances (for example, if the signaling server provides an
incorrect list of users) the peer that received the offer can disconnect
from the peer that created the offer without causing the peer that
created the offer to disconnect from the peer that received the offer
too.

A peer only tried to connect with another peer if its session ID was
larger than the session ID of the other peer; otherwise it just waited
for the other peer to start the connection instead. This is done that
way to prevent overloading a peer joining a room.

However, in the scenario above, the peer that received the offer just
waited for the peer that created the offer to start the connection
again. As the peer that created the offer was not aware of the
disconnection it did not try to connect again, and thus they never
reconnected.

It is not possible to ensure that the peer that created the offer will
always disconnect from the peer that received the offer if the peer that
received the offer disconnects from the peer that created the offer, so
this is handled instead by making that peers with smaller session IDs
also start a connection if the peer with the larger session ID did not
in a reasonable time.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants