changeset 9142:7e8ee4b7cbf4

QUIC: fixed PTO expiration condition. Previously, PTO handler analyzed the first packet in the sent queue for the timeout expiration. However, the last sent packet should be analyzed instead. An example is timeout calculation in ngx_quic_set_lost_timer().
author Roman Arutyunyan <arut@nginx.com>
date Tue, 01 Aug 2023 11:21:59 +0400
parents 5d1e7c74aadf
children 48691bab4474
files src/event/quic/ngx_event_quic_ack.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/event/quic/ngx_event_quic_ack.c
+++ b/src/event/quic/ngx_event_quic_ack.c
@@ -840,7 +840,7 @@ ngx_quic_pto_handler(ngx_event_t *ev)
             continue;
         }
 
-        q = ngx_queue_head(&ctx->sent);
+        q = ngx_queue_last(&ctx->sent);
         f = ngx_queue_data(q, ngx_quic_frame_t, queue);
 
         if (f->pnum <= ctx->largest_ack