pion / mediadevices

Go implementation of the MediaDevices API.
https://pion.ly/
MIT License
521 stars 120 forks source link

fix(`baseTrack`): panic on close of nil channel #474

Open adityaa30 opened 1 year ago

adityaa30 commented 1 year ago
panic: close of nil channel

goroutine 281 [running]:
github.com/pion/mediadevices.(*baseTrack).bind.func1.1()
    /Users/naruto/go/pkg/mod/github.com/pion/mediadevices@v0.3.12/track.go:190 +0x54
github.com/pion/mediadevices.(*baseTrack).bind.func1()
    /Users/naruto/go/pkg/mod/github.com/pion/mediadevices@v0.3.12/track.go:204 +0x120
created by github.com/pion/mediadevices.(*baseTrack).bind
    /Users/naruto/go/pkg/mod/github.com/pion/mediadevices@v0.3.12/track.go:186 +0x30c

Process finished with the exit code 1
codecov[bot] commented 1 year ago

Codecov Report

Base: 58.08% // Head: 58.05% // Decreases project coverage by -0.04% :warning:

Coverage data is based on head (8e0c671) compared to base (76ba048). Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #474 +/- ## ========================================== - Coverage 58.08% 58.05% -0.04% ========================================== Files 62 62 Lines 3691 3693 +2 ========================================== Hits 2144 2144 - Misses 1420 1422 +2 Partials 127 127 ``` | [Impacted Files](https://codecov.io/gh/pion/mediadevices/pull/474?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) | Coverage Δ | | |---|---|---| | [track.go](https://codecov.io/gh/pion/mediadevices/pull/474?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#diff-dHJhY2suZ28=) | `24.53% <0.00%> (-0.16%)` | :arrow_down: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.