From 843f807b95939475c5e1883104d2c00da8819821 Mon Sep 17 00:00:00 2001 From: wangfuyu Date: Mon, 27 Sep 2021 21:23:15 +0800 Subject: [PATCH] m) fix: check if connection is out of startup phase by comparing cwnd but not cwnd_gain with target_window (#328) --- src/liblsquic/lsquic_bbr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/liblsquic/lsquic_bbr.c b/src/liblsquic/lsquic_bbr.c index dfdc347..3d5f835 100644 --- a/src/liblsquic/lsquic_bbr.c +++ b/src/liblsquic/lsquic_bbr.c @@ -926,7 +926,7 @@ calculate_cwnd (struct lsquic_bbr *bbr, uint64_t bytes_acked, if (bbr->bbr_flags & BBR_FLAG_IS_AT_FULL_BANDWIDTH) bbr->bbr_cwnd = MIN(target_window, bbr->bbr_cwnd + bytes_acked); else if (add_bytes_acked && - (bbr->bbr_cwnd_gain < target_window || + (bbr->bbr_cwnd < target_window || lsquic_bw_sampler_total_acked(&bbr->bbr_bw_sampler) < bbr->bbr_init_cwnd)) // If the connection is not yet out of startup phase, do not decrease