From a87b3262ff7daeac3a76857d1eaaf944d5cd9d29 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Fri, 25 Feb 2022 09:23:27 +0100 Subject: [PATCH] bbr: avoid unwrapping a value we just set --- quinn-proto/src/congestion/bbr/bw_estimation.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quinn-proto/src/congestion/bbr/bw_estimation.rs b/quinn-proto/src/congestion/bbr/bw_estimation.rs index 176ff8b40..197a17234 100644 --- a/quinn-proto/src/congestion/bbr/bw_estimation.rs +++ b/quinn-proto/src/congestion/bbr/bw_estimation.rs @@ -84,7 +84,7 @@ impl BandwidthEstimation { } else { BandwidthEstimation::bw_from_delta( self.total_acked - self.prev_total_acked, - self.acked_time.unwrap() - self.prev_acked_time.unwrap(), + now - self.prev_acked_time.unwrap(), ) .unwrap_or(0) };