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

Don't generate padding when none is requested #224

Merged
merged 1 commit into from
Jul 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/streams/send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,10 @@ impl StreamTx {
}

fn poll_packet_padding(&mut self, _now: Instant) -> Option<NextPacket> {
if self.padding == 0 {
return None;
}

let next = if self.padding > MIN_SPURIOUS_PADDING_SIZE {
// Find a historic packet that is smaller than this max size. The max size
// is a headroom since we can accept slightly larger padding than asked for.
Expand Down
Loading