Reset min_rtt, srtt, rttvar on persistent congestion
@@ -987,6 +987,12 @@ int ngtcp2_rtb_detect_lost_pkt(ngtcp2_rtb *rtb, ngtcp2_conn *conn,
" congestion_period=%" PRIu64,
loss_window, congestion_period);
+ /* Reset min_rtt, srtt, and rttvar here. Next new RTT
+ sample will be used to recalculate these values. */
+ cstat->min_rtt = INT64_MAX;
+ cstat->smoothed_rtt = conn->local.settings.initial_rtt;
+ cstat->rttvar = conn->local.settings.initial_rtt / 2;
+
cc->on_persistent_congestion(cc, cstat, ts);
}
}
