mirror of
https://github.com/nginx/nginx.git
synced 2024-12-12 02:09:04 +08:00
QUIC: always calculate rtt for largest acknowledged packet.
Previously, when processing client ACK, rtt could be calculated for a packet different than the largest if it was missing in the sent chain. Even though this is an unlikely situation, rtt based on a different packet could be larger than needed leading to bigger pto timeout and performance degradation.
This commit is contained in:
parent
4fd02c5839
commit
240f8a918e
@ -3276,7 +3276,6 @@ static ngx_int_t
|
|||||||
ngx_quic_handle_ack_frame_range(ngx_connection_t *c, ngx_quic_send_ctx_t *ctx,
|
ngx_quic_handle_ack_frame_range(ngx_connection_t *c, ngx_quic_send_ctx_t *ctx,
|
||||||
uint64_t min, uint64_t max, ngx_msec_t *send_time)
|
uint64_t min, uint64_t max, ngx_msec_t *send_time)
|
||||||
{
|
{
|
||||||
uint64_t found_num;
|
|
||||||
ngx_uint_t found;
|
ngx_uint_t found;
|
||||||
ngx_queue_t *q;
|
ngx_queue_t *q;
|
||||||
ngx_quic_frame_t *f;
|
ngx_quic_frame_t *f;
|
||||||
@ -3286,7 +3285,6 @@ ngx_quic_handle_ack_frame_range(ngx_connection_t *c, ngx_quic_send_ctx_t *ctx,
|
|||||||
|
|
||||||
*send_time = NGX_TIMER_INFINITE;
|
*send_time = NGX_TIMER_INFINITE;
|
||||||
found = 0;
|
found = 0;
|
||||||
found_num = 0;
|
|
||||||
|
|
||||||
q = ngx_queue_last(&ctx->sent);
|
q = ngx_queue_last(&ctx->sent);
|
||||||
|
|
||||||
@ -3316,9 +3314,8 @@ ngx_quic_handle_ack_frame_range(ngx_connection_t *c, ngx_quic_send_ctx_t *ctx,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (f->pnum > found_num || !found) {
|
if (f->pnum == max) {
|
||||||
*send_time = f->last;
|
*send_time = f->last;
|
||||||
found_num = f->pnum;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngx_queue_remove(&f->queue);
|
ngx_queue_remove(&f->queue);
|
||||||
|
Loading…
Reference in New Issue
Block a user