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 59415c7 commit e6200e7
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 @@ -562,6 +562,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 @@ -570,10 +574,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 e6200e7

Please sign in to comment.