diff options
author | Roman Arutyunyan <arut@nginx.com> | 2023-08-10 20:11:29 +0400 |
---|---|---|
committer | Roman Arutyunyan <arut@nginx.com> | 2023-08-10 20:11:29 +0400 |
commit | 6f5f17358ee6286e491f287eeda5cf2b3946bab6 (patch) | |
tree | 5f48dc547164dc86065707c0620bf8d20b3c9dd7 /src | |
parent | 6e60e21ac09a88a17e08cb4a15ebfcd6634ba10b (diff) | |
download | nginx-6f5f17358ee6286e491f287eeda5cf2b3946bab6.tar.gz nginx-6f5f17358ee6286e491f287eeda5cf2b3946bab6.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/event/quic/ngx_event_quic_output.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/event/quic/ngx_event_quic_output.c b/src/event/quic/ngx_event_quic_output.c index 38006a9a5..88b7df6ab 100644 --- a/src/event/quic/ngx_event_quic_output.c +++ b/src/event/quic/ngx_event_quic_output.c @@ -1174,8 +1174,9 @@ ngx_quic_send_ack(ngx_connection_t *c, ngx_quic_send_ctx_t *ctx) 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; } |