-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Close unhandled rtcp simulcast streams #2826
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2826 +/- ##
==========================================
- Coverage 79.01% 78.91% -0.11%
==========================================
Files 89 89
Lines 8292 8303 +11
==========================================
Hits 6552 6552
- Misses 1267 1275 +8
- Partials 473 476 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I noticed the srtcp leaking packetio.buffer's when I added a goroutine to them in pion/transport#304 |
continue | ||
} | ||
|
||
pc.dtlsTransport.storeSimulcastStream(srtpReadStream, srtcpReadStream) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
an observation while working on this: we hang onto these for the lifetime of the PC which could increase memory over time. It would be better to know that these are strictly 1. not valid when expecting simulcast and 2. not valid ssrcs when we are non-simulcast
handleIncomingSSRC will call streamsForSSRC which opens rtp/rtcp streams that if unhandled can be leaked resources. Now we will proactively open them before calling handleIncomingSSRC and close then later. In the future it would be better to do this inside handleIncomingSSRC to protect other callers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
handleIncomingSSRC will call streamsForSSRC which opens rtp/rtcp streams that if unhandled can be leaked resources. Now we will proactively open them before calling handleIncomingSSRC and close then later. In the future it would be better to do this inside handleIncomingSSRC to protect other callers.