]> git.kaiwu.me - nginx.git/commitdiff
QUIC: do not arm loss detection timer on packet threshold.
authorSergey Kandaurov <pluknet@nginx.com>
Wed, 19 Aug 2020 10:24:53 +0000 (13:24 +0300)
committerSergey Kandaurov <pluknet@nginx.com>
Wed, 19 Aug 2020 10:24:53 +0000 (13:24 +0300)
src/event/ngx_event_quic.c

index 0781bcfb0aa33ac1c57386edcff89a69523f8bf9..ef57f6cad63cde2a54269e25b0dd1658432f3f21 100644 (file)
@@ -3800,15 +3800,15 @@ ngx_quic_detect_lost(ngx_connection_t *c)
                            "quic detect_lost pnum:%ui thr:%M wait:%i level:%d",
                            start->pnum, thr, (ngx_int_t) wait, start->level);
 
-            if ((ngx_msec_int_t) wait > 0) {
+            if ((ngx_msec_int_t) wait > 0
+                && ctx->largest_ack - start->pnum < NGX_QUIC_PKT_THR)
+            {
 
                 if (min_wait == 0 || wait < min_wait) {
                     min_wait = wait;
                 }
 
-                if (ctx->largest_ack - start->pnum < NGX_QUIC_PKT_THR) {
-                    break;
-                }
+                break;
             }
 
             if (ngx_quic_resend_frames(c, ctx, start) != NGX_OK) {