Skip to content

Commit

Permalink
enforce STREAM_MAX_ACTIVE_LIMIT
Browse files Browse the repository at this point in the history
  • Loading branch information
mxinden committed May 14, 2024
1 parent 12390c8 commit 0ad1b77
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions neqo-transport/src/fc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// into flow control frames needing to be sent to the remote.

use std::{
cmp::min,
fmt::Debug,
ops::{Deref, DerefMut, Index, IndexMut},
time::{Duration, Instant},
Expand Down Expand Up @@ -396,9 +397,9 @@ impl ReceiverFlowControl<StreamId> {
&& self.max_active < STREAM_MAX_ACTIVE_LIMIT
{
let prev_max_active = self.max_active;
self.max_active *= 2;
self.max_active = min(self.max_active * 2, STREAM_MAX_ACTIVE_LIMIT);
qdebug!(
"Doubling max stream receive window: previous max_active: {} MiB new max_active: {} MiB now: {now:?} rtt: {rtt:?} stream_id: {}",
"Increasing max stream receive window: previous max_active: {} MiB new max_active: {} MiB now: {now:?} rtt: {rtt:?} stream_id: {}",
prev_max_active / 1024 / 1024, self.max_active / 1024 / 1024, self.subject,
);
}
Expand Down

0 comments on commit 0ad1b77

Please sign in to comment.