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

Fix763 #816

Merged
merged 2 commits into from Sep 7, 2019
Merged

Fix763 #816

merged 2 commits into from Sep 7, 2019

Conversation

Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
@cohosh
Copy link
Contributor

@cohosh cohosh commented Sep 6, 2019

Description

This patch reverts the breaking changes made to the core WebRTC API in #763 and modifies the pion-to-pion-trickle example to work properly with the WebRTC API as specified in https://w3c.github.io/webrtc-pc/ and following the specification of trickle ICE in https://tools.ietf.org/html/draft-ietf-mmusic-trickle-ice-02

A change was recently made to the SetLocal and SetRemoteDescription
functions for PeerConnection that starts ICE gathering for the trickle
method only when generating an answer. This means clients generating an
offer to initiate signaling will stall indefinitely.
@cohosh cohosh mentioned this pull request Sep 6, 2019
This commit uses synchronization primitives so that peers in the
pion-to-pion-trickle example adhere to the trickle ICE specification
https://tools.ietf.org/html/draft-ietf-mmusic-trickle-ice-02
To be more specific, the offering peer waits to send the answering peer
remote ICE candidates until after they have sent the initial offer. The
answering peer then waits to add any remote candidates until after it
has processed the initial offer. Similarly, the offering peer waits to
add remote candidates until it has processed the corresponding answer.
@codecov-io
Copy link

@codecov-io codecov-io commented Sep 6, 2019

Codecov Report

Merging #816 into master will decrease coverage by 0.18%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #816      +/-   ##
==========================================
- Coverage   76.21%   76.02%   -0.19%     
==========================================
  Files          59       59              
  Lines        4250     4246       -4     
==========================================
- Hits         3239     3228      -11     
- Misses        742      748       +6     
- Partials      269      270       +1
Impacted Files Coverage Δ
peerconnection.go 73.01% <0%> (-0.01%) ⬇️
dtlstransport.go 66.86% <0%> (-4.66%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 444e0bc...5bceb01. Read the comment docs.

@cohosh
Copy link
Contributor Author

@cohosh cohosh commented Sep 6, 2019

Hmm, looks like travis is not happy here. There might have been more dependencies on the reverted change for examples

@cohosh
Copy link
Contributor Author

@cohosh cohosh commented Sep 6, 2019

Hmm, looks like travis is not happy here. There might have been more dependencies on the reverted change for examples

Nevermind, it's passing now. I think it was the formatting issue of the commit message that i fixed last commit :)

@Sean-Der Sean-Der merged commit 5bceb01 into pion:master Sep 7, 2019
1 of 3 checks passed
@Sean-Der
Copy link
Member

@Sean-Der Sean-Der commented Sep 7, 2019

@cohosh merged!

I also added a test so this won't regress in the future 9fa65c2

Thank you so much for catching this. Sorry for the time lost debugging Pion :/ if you have anything that could have made this process easier I am all ears!

@cohosh
Copy link
Contributor Author

@cohosh cohosh commented Sep 8, 2019

@cohosh merged!

I also added a test so this won't regress in the future 9fa65c2

Thank you so much! I am not sure of what your other use cases are, but there might in the future be call for a unit test that is a bit more nuanced. Here's what the RFC referenced by the w3c draft states: https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-25#section-5.9

Thank you so much for catching this. Sorry for the time lost debugging Pion :/ if you have anything that could have made this process easier I am all ears!

Thank you for taking a look at this so quickly, I'm really grateful for your understanding and feedback. Your responses have helped us a lot in integrating this library and evaluating it :) I'll be more cognizant of major/minor version upgrades in the future as well. Time spent assessing changes is not unusual for performing version updates of libraries.

Out of curiosity, do you have changelogs or summaries of changes for minor version bumps?

@Sean-Der
Copy link
Member

@Sean-Der Sean-Der commented Sep 11, 2019

Thank you so much! I am not sure of what your other use cases are, but there might in the future be call for a unit test that is a bit more nuanced. Here's what the RFC referenced by the w3c draft states: https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-25#section-5.9

👍 for that. Lately I have been doing a lot of breadth, but not much depth. I am actually not super familiar with trickle ICE and all the nuances. I will try and come back to it eventually though.

I personally don't use it, so not a lot of drive from me to work on it.

Out of curiosity, do you have changelogs or summaries of changes for minor version bumps?

I will start doing that. I just haven't been doing it out of laziness/assuming no one is reading!

@@ -99,12 +110,14 @@ func main() {
} else if closeErr := resp.Body.Close(); closeErr != nil {
panic(closeErr)
}
answerwg.Add(1) //We have now sent the answer and can send candidates to the peer
Copy link

@arlolra arlolra Sep 25, 2019

Shouldn't this be answerwg.Done()?

Copy link
Member

@Sean-Der Sean-Der Sep 25, 2019

Hey @arlolra

Thanks for the review, we ended up dropping the WaitGroup because it didn't work in WASM https://github.com/pion/webrtc/blob/master/examples/pion-to-pion-trickle/answer/main.go

Hopefully this issue wasn't ported over!

Copy link
Contributor Author

@cohosh cohosh Sep 26, 2019

Oh thanks for catching that arlo!

@Sean-Der does this fix make it work in WASM?

Copy link
Member

@Sean-Der Sean-Der Oct 4, 2019

@cohosh

Yes! It now compiles for WASM with this change. I don't actually use the WASM implementation myself so don't know all the deep details sorry :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment