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 crash when a PC callback is reset #1872

Closed
wants to merge 2 commits into from
Closed

Conversation

jech
Copy link
Member

@jech jech commented Jul 7, 2021

  • Move setting of PC state into separate function
  • Avoid crash after a PC callback has been reset

Fixes #1871

This is analogous to what is already done for the ICE state.
@jech jech force-pushed the fix-nil-callback branch 3 times, most recently from 3b94d3e to 7e44a62 Compare July 7, 2021 14:17
@codecov
Copy link

codecov bot commented Jul 7, 2021

Codecov Report

Merging #1872 (c282ff8) into master (d1839c7) will decrease coverage by 0.14%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1872      +/-   ##
==========================================
- Coverage   75.82%   75.68%   -0.15%     
==========================================
  Files          84       84              
  Lines        6048     6049       +1     
==========================================
- Hits         4586     4578       -8     
- Misses       1076     1084       +8     
- Partials      386      387       +1     
Flag Coverage Δ
go 77.38% <100.00%> (-0.16%) ⬇️
wasm 71.26% <ø> (ø)

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

Impacted Files Coverage Δ
peerconnection.go 75.13% <100.00%> (+0.19%) ⬆️
sctptransport.go 76.11% <0.00%> (-3.34%) ⬇️
dtlstransport.go 63.88% <0.00%> (-1.86%) ⬇️
datachannel.go 82.98% <0.00%> (-1.25%) ⬇️
icetransport.go 68.63% <0.00%> (+1.18%) ⬆️

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 d1839c7...c282ff8. Read the comment docs.

We used to crash if a PC callback was reset, due to confusion
between a nil interface and an interface whose value is nil.
@Sean-Der
Copy link
Member

Sean-Der commented Jul 7, 2021

Merged with ee255e8

@Sean-Der Sean-Der closed this Jul 7, 2021
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.

"go of nil func value" in PeerConnection.updateConnectionState
2 participants