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 ORTC accept datachannel sctpTransport is nil #2303

Merged
merged 1 commit into from
Apr 24, 2023

Conversation

jerry-tao
Copy link
Member

Description

When using ORTC API, the new accepted channel don't set the sctpTransport, see https://github.com/pion/webrtc/blob/master/sctptransport.go#L219.

it will panic if someone try to use it:

pair, err := channel.Transport().Transport().ICETransport().GetSelectedCandidatePair()

@codecov
Copy link

codecov bot commented Sep 22, 2022

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.12 ⚠️

Comparison is base (570b61a) 77.75% compared to head (b069de7) 77.64%.

❗ Current head b069de7 differs from pull request most recent head be7a893. Consider uploading reports for the commit be7a893 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2303      +/-   ##
==========================================
- Coverage   77.75%   77.64%   -0.12%     
==========================================
  Files          87       87              
  Lines        9318     9276      -42     
==========================================
- Hits         7245     7202      -43     
+ Misses       1646     1644       -2     
- Partials      427      430       +3     
Flag Coverage Δ
go 79.42% <100.00%> (-0.12%) ⬇️
wasm 70.15% <ø> (ø)

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

Impacted Files Coverage Δ
datachannel.go 85.12% <100.00%> (-0.82%) ⬇️
peerconnection.go 78.29% <100.00%> (-0.28%) ⬇️
sctptransport.go 77.90% <100.00%> (ø)

... and 9 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Sean-Der
Copy link
Member

Sorry I missed this @jerry-tao ! I will merge right now, thank you so much for the contribution :)

ORTC API would return a nil SCTPTransport for DataChannels returned via
Callback
@Sean-Der Sean-Der merged commit 16fea9e into pion:master Apr 24, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants