m) fix: check if connection is out of startup phase by comparing cwnd but not cwnd_gain with target_window (#328)

This commit is contained in:
wangfuyu 2021-09-27 21:23:15 +08:00 committed by GitHub
parent fb96e96193
commit 843f807b95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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