Skip to content

Commit

Permalink
less logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mxinden committed Nov 23, 2023
1 parent 2ec46aa commit 23c1e74
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions yamux/src/connection/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,10 @@ impl Shared {
let buffer_len = self.buffer.len();
let mut new_credit = bytes_received.saturating_sub(buffer_len);

if new_credit < self.window_max / 2 {
return None;
}

log::debug!(
"received {} mb in {} seconds ({} mbit/s)",
new_credit as f64 / 1024.0 / 1024.0,
Expand All @@ -558,10 +562,6 @@ impl Shared {
/ self.last_window_update.elapsed().as_secs_f64()
);

if new_credit < self.window_max / 2 {
return None;
}

if let Some(rtt) = self.rtt.rtt() {
if self.last_window_update.elapsed() < rtt * 2 {
let previous_window_max = self.window_max;
Expand Down

0 comments on commit 23c1e74

Please sign in to comment.