Skip to content

Commit

Permalink
refactor (with the side-effect of using jumpstart on the client side …
Browse files Browse the repository at this point in the history
…too, if configured)
  • Loading branch information
kazuho committed Apr 25, 2024
1 parent 9a4c645 commit f153ac5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/quicly.c
Original file line number Diff line number Diff line change
Expand Up @@ -2559,9 +2559,7 @@ static quicly_conn_t *create_connection(quicly_context_t *ctx, uint32_t protocol
quicly_linklist_init(&conn->egress.pending_streams.blocked.bidi);
quicly_linklist_init(&conn->egress.pending_streams.control);
quicly_ratemeter_init(&conn->egress.ratemeter);
if (server_name == NULL && conn->super.ctx->use_pacing && conn->egress.cc.type->cc_jumpstart != NULL &&
(conn->super.ctx->default_jumpstart_cwnd_packets != 0 || conn->super.ctx->max_jumpstart_cwnd_packets != 0))
conn->egress.try_jumpstart = 1;
conn->egress.try_jumpstart = 1;
if (handshake_properties != NULL) {
assert(handshake_properties->additional_extensions == NULL);
assert(handshake_properties->collect_extension == NULL);
Expand Down Expand Up @@ -5391,7 +5389,9 @@ static int do_send(quicly_conn_t *conn, quicly_send_context_t *s)
* size of the pacer (10 packets) */
if (conn->egress.try_jumpstart && conn->egress.loss.rtt.minimum != UINT32_MAX) {
conn->egress.try_jumpstart = 0;
if (conn->egress.cc.num_loss_episodes == 0) {
if (conn->super.ctx->use_pacing && conn->egress.cc.type->cc_jumpstart != NULL &&
(conn->super.ctx->default_jumpstart_cwnd_packets != 0 || conn->super.ctx->max_jumpstart_cwnd_packets != 0) &&
conn->egress.cc.num_loss_episodes == 0) {
uint32_t jumpstart_cwnd = 0;
conn->super.stats.jumpstart.new_rtt = conn->egress.loss.rtt.minimum;
if (conn->super.ctx->max_jumpstart_cwnd_packets != 0 && conn->super.stats.jumpstart.prev_rate != 0 &&
Expand Down

0 comments on commit f153ac5

Please sign in to comment.