From 78d8619dd9bd3ea2bd762e9329854c8383de718a Mon Sep 17 00:00:00 2001 From: Matthias Einwag Date: Thu, 19 Aug 2021 05:10:10 +0000 Subject: [PATCH] Fix cubic minimum congestion window handling `config.minimum_window` is already in bytes - it doesn't have to be multiplied by them.. --- quinn-proto/src/congestion/cubic.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/quinn-proto/src/congestion/cubic.rs b/quinn-proto/src/congestion/cubic.rs index 5a413d4f7..6251470a1 100644 --- a/quinn-proto/src/congestion/cubic.rs +++ b/quinn-proto/src/congestion/cubic.rs @@ -191,10 +191,7 @@ impl Controller for Cubic { self.cubic_state.w_max = self.window as f64; self.ssthresh = (self.cubic_state.w_max * BETA_CUBIC) as u64; - self.ssthresh = cmp::max( - self.ssthresh, - self.config.max_datagram_size * self.config.minimum_window, - ); + self.ssthresh = cmp::max(self.ssthresh, self.config.minimum_window); self.window = self.ssthresh; self.cubic_state.k = self.cubic_state.cubic_k(self.config.max_datagram_size);