-
-
Notifications
You must be signed in to change notification settings - Fork 386
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
Implement pion commit 2184 - mux: drop packets when buffer is full #516
Implement pion commit 2184 - mux: drop packets when buffer is full #516
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #516 +/- ##
=======================================
Coverage 61.52% 61.53%
=======================================
Files 529 529
Lines 48866 48878 +12
Branches 12375 12381 +6
=======================================
+ Hits 30067 30079 +12
+ Misses 9593 9591 -2
- Partials 9206 9208 +2 ☔ View full report in Codecov by Sentry. |
log::debug!("s.read_sctp begin"); | ||
match s0.read_sctp(&mut buf).await { | ||
Ok((0, PayloadProtocolIdentifier::Unknown)) => { | ||
log::debug!("s0.read_sctp EOF"); | ||
let _ = done_ch_tx0.send(Some(Error::ErrEof)).await; | ||
} | ||
Ok(_) => { | ||
panic!("must be error"); | ||
} | ||
Err(err) => { | ||
log::debug!("s0.read_sctp err {:?}", err); | ||
let _ = done_ch_tx0.send(Some(err)).await; |
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.
(flyby) clippy was complaining that this loop
never actually looped, so I removed it.
This PR implements pion commit 2184.
Currently it's assumed that the read buffer will never fill, and so any failure to
write
should be cause to return anErr
. This isn't always true however, particularly in high load scenarios. Perpion
fixes, we should instead log and drop packets when the buffer is full, and continue to return an error in other failure cases.See pion/webrtc#2152 and pion/webrtc#2180 for more details.