Mercurial > hg > nginx
changeset 9139:d7dec2970161
QUIC: always add ACK frame to the queue head.
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.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Thu, 10 Aug 2023 20:11:29 +0400 |
parents | a90f79792b5d |
children | e9a003d40485 |
files | src/event/quic/ngx_event_quic_output.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/event/quic/ngx_event_quic_output.c Thu Jul 27 16:37:17 2023 +0400 +++ b/src/event/quic/ngx_event_quic_output.c Thu Aug 10 20:11:29 2023 +0400 @@ -1174,8 +1174,9 @@ 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; }