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

Avoid race between set-remote-description and link_streams #226

Merged
merged 1 commit into from Mar 29, 2019

Conversation

@Manishearth
Copy link
Member

Manishearth commented Mar 29, 2019

It is possible for link_streams to be called when our code has received a remote offer (and thus remote_mline_info is set), but before set-remote-description has completely finished executing. This can lead to link_streams thinking that the webrtcbin is ready to create new pads, while the internal transceivers haven't yet been created. Thus even though we link streams to the appropriate pads, the transceivers are created in the wrong order, and some of the gstreamer code looks at transceiver creation order instead of mline info (this is a bug), breaking things.

fixes #225

r? @jdm

It is possible for link_streams to be called when our code has received a remote offer (and thus `remote_mline_info` is set), but before `set-remote-description` has completely finished executing. This can lead to `link_streams` _thinking_ that the webrtcbin is ready to create new pads, while the internal transceivers haven't yet been created. Thus even though we link streams to the appropriate pads, the transceivers are created in the wrong order, and some of the gstreamer code looks at transceiver creation order instead of mline info (this is a bug), breaking things.

fixes ##225
@jdm
jdm approved these changes Mar 29, 2019
@jdm
Copy link
Member

jdm commented Mar 29, 2019

@bors-servo r+
Thanks for investigating!

@bors-servo
Copy link
Contributor

bors-servo commented Mar 29, 2019

📌 Commit fa4f7cf has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Mar 29, 2019

Testing commit fa4f7cf with merge 62d748a...

bors-servo added a commit that referenced this pull request Mar 29, 2019
Avoid race between set-remote-description and link_streams

It is possible for link_streams to be called when our code has received a remote offer (and thus `remote_mline_info` is set), but before `set-remote-description` has completely finished executing. This can lead to `link_streams` _thinking_ that the webrtcbin is ready to create new pads, while the internal transceivers haven't yet been created. Thus even though we link streams to the appropriate pads, the transceivers are created in the wrong order, and some of the gstreamer code looks at transceiver creation order instead of mline info (this is a bug), breaking things.

fixes ##225

r? @jdm
@bors-servo
Copy link
Contributor

bors-servo commented Mar 29, 2019

☀️ Test successful - checks-travis
Approved by: jdm
Pushing 62d748a to master...

@bors-servo bors-servo merged commit fa4f7cf into servo:master Mar 29, 2019
2 checks passed
2 checks passed
Travis CI - Pull Request Build Passed
Details
homu Test successful
Details
@Manishearth Manishearth deleted the Manishearth:link-stream-race branch Mar 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants
You can’t perform that action at this time.