Mercurial > hg > nginx
comparison src/event/quic/ngx_event_quic_output.c @ 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 | 9ae24a9ba763 |
children | e9a003d40485 |
comparison
equal
deleted
inserted
replaced
9138:a90f79792b5d | 9139:d7dec2970161 |
---|---|
1172 frame->type = NGX_QUIC_FT_ACK; | 1172 frame->type = NGX_QUIC_FT_ACK; |
1173 frame->u.ack.largest = ctx->largest_range; | 1173 frame->u.ack.largest = ctx->largest_range; |
1174 frame->u.ack.delay = ack_delay; | 1174 frame->u.ack.delay = ack_delay; |
1175 frame->u.ack.range_count = ctx->nranges; | 1175 frame->u.ack.range_count = ctx->nranges; |
1176 frame->u.ack.first_range = ctx->first_range; | 1176 frame->u.ack.first_range = ctx->first_range; |
1177 | 1177 frame->len = ngx_quic_create_frame(NULL, frame); |
1178 ngx_quic_queue_frame(qc, frame); | 1178 |
1179 ngx_queue_insert_head(&ctx->frames, &frame->queue); | |
1179 | 1180 |
1180 return NGX_OK; | 1181 return NGX_OK; |
1181 } | 1182 } |
1182 | 1183 |
1183 | 1184 |