Previously it was added to the tail as all other frames. However, if the
amount of queued data is large, it could delay the delivery of ACK, which
could trigger frames retransmissions and slow down the connection.
frame->u.ack.delay = ack_delay;
frame->u.ack.range_count = ctx->nranges;
frame->u.ack.first_range = ctx->first_range;
+ frame->len = ngx_quic_create_frame(NULL, frame);
- ngx_quic_queue_frame(qc, frame);
+ ngx_queue_insert_head(&ctx->frames, &frame->queue);
return NGX_OK;
}