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

fix:issue#1212 candidate with empty string #1584

Closed
wants to merge 1 commit into from

Conversation

scorpionknifes
Copy link
Member

Description

based on #1428 (comment)

merge after pion/ice accept nil candidate pion/ice#315 (comment)

thx @DevRockstarZ for PR #1428

Reference issue

Fixes #1212

@Sean-Der
Copy link
Member

Sean-Der commented Dec 9, 2020

@scorpionknifes this looks great to me! I would be happy to take this today :)

  • Can you squash this down into one commit
  • I would make you the author, and then use Co-authored-by:
  • You have a few linter errors

@Sean-Der
Copy link
Member

Sean-Der commented Dec 9, 2020

@scorpionknifes pion/[email protected] is tagged!

@scorpionknifes scorpionknifes force-pushed the empty-candidate branch 4 times, most recently from 6e0b7c7 to 98da941 Compare December 9, 2020 06:06
@codecov
Copy link

codecov bot commented Dec 9, 2020

Codecov Report

Merging #1584 (a869563) into master (236b6c4) will decrease coverage by 0.02%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1584      +/-   ##
==========================================
- Coverage   75.10%   75.08%   -0.03%     
==========================================
  Files          79       79              
  Lines        5612     5619       +7     
==========================================
+ Hits         4215     4219       +4     
- Misses       1025     1026       +1     
- Partials      372      374       +2     
Flag Coverage Δ
go 76.69% <66.66%> (-0.03%) ⬇️
wasm 70.42% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
icetransport.go 68.66% <ø> (ø)
peerconnection.go 74.28% <66.66%> (-0.11%) ⬇️

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 236b6c4...a869563. Read the comment docs.

@scorpionknifes
Copy link
Member Author

I'm gonna need to take a deeper look

@Sean-Der
Copy link
Member

Sean-Der commented Dec 9, 2020

If think if you move your test into peerconnection_go_test.go it will work! It is just being run for WASM also currently.

For the race I would update t *ICETransport) AddRemoteCandidate( to accept a *ICECandidate and that will make your life easier. The lifecycle of the ICEAgent is messy.

@scorpionknifes scorpionknifes force-pushed the empty-candidate branch 5 times, most recently from 2d3d285 to ac78a8b Compare December 9, 2020 11:50
Pass empty string candidate.Candidate into pion/ice to handle.

Co-authored-by: JooYoung <[email protected]>
Comment on lines +1472 to +1474
if agent == nil {
return fmt.Errorf("%w: unable to add remote candidates", errICEAgentNotExist)
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Anyway, I can cover this by setting agent=nil in test?

@Sean-Der
Copy link
Member

Merged with 3eb51d8

Fantastic work @scorpionknifes really appreciate all the work you have been doing lately? Do you have a Twitter? I would love to give you a shout out for all the great work you are doing (if not will just do your GitHub)

@Sean-Der Sean-Der closed this Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

pc.AddIceCandidate complains when candidate.Candidate is the empty string
2 participants