Skip to content

Commit

Permalink
Merge pull request #580 from h2o/kazuho/jumpstart-use-max-rate
Browse files Browse the repository at this point in the history
for careful resume, use max(latest, smoothed) rather than smoothed
  • Loading branch information
kazuho authored May 13, 2024
2 parents 696ff63 + 9369520 commit 052eae2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/quicly.c
Original file line number Diff line number Diff line change
Expand Up @@ -4278,8 +4278,9 @@ static int send_resumption_token(quicly_conn_t *conn, quicly_send_context_t *s)
{ /* fill conn->super.stats.token_sent the information we are sending now */
quicly_rate_t rate;
conn->super.stats.token_sent.at = conn->stash.now - conn->created_at;
if (conn->egress.loss.rtt.minimum != 0 && (quicly_ratemeter_report(&conn->egress.ratemeter, &rate), rate.smoothed != 0)) {
conn->super.stats.token_sent.rate = rate.smoothed;
if (conn->egress.loss.rtt.minimum != 0 &&
(quicly_ratemeter_report(&conn->egress.ratemeter, &rate), rate.smoothed != 0 || rate.latest != 0)) {
conn->super.stats.token_sent.rate = rate.smoothed > rate.latest ? rate.smoothed : rate.latest;
conn->super.stats.token_sent.rtt = conn->egress.loss.rtt.minimum;
} else {
conn->super.stats.token_sent.rate = 0;
Expand Down

0 comments on commit 052eae2

Please sign in to comment.