Skip to content

Commit

Permalink
remove rtt from throttle_duration calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
lijunwangs committed Apr 22, 2024
1 parent cef9175 commit 469b738
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions streamer/src/nonblocking/quic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -834,8 +834,7 @@ async fn handle_connection(
// The peer is sending faster than we're willing to read. Sleep for what's
// left of this read interval so the peer backs off.
let throttle_duration = STREAM_THROTTLING_INTERVAL
.saturating_sub(throttle_interval_start.elapsed())
.saturating_sub(connection.rtt());
.saturating_sub(throttle_interval_start.elapsed());

if !throttle_duration.is_zero() {
debug!("Throttling stream from {remote_addr:?}, peer type: {:?}, total stake: {}, \
Expand Down

0 comments on commit 469b738

Please sign in to comment.