]> git.kaiwu.me - nginx.git/commitdiff
QUIC: resend handshake packets along with initial.
authorRoman Arutyunyan <arut@nginx.com>
Tue, 8 Dec 2020 17:10:22 +0000 (17:10 +0000)
committerRoman Arutyunyan <arut@nginx.com>
Tue, 8 Dec 2020 17:10:22 +0000 (17:10 +0000)
To speed up handshake, resend both initial and handshake packets if there's
at least one unacknowledged initial packet.

src/event/ngx_event_quic.c

index 95f92ed210b470bfd5eb18f6aa78522febab2bb4..ace2de7499040ba66b1837cc48a87946bcacdfb1 100644 (file)
@@ -3717,6 +3717,11 @@ ngx_quic_handle_crypto_frame(ngx_connection_t *c, ngx_quic_header_t *pkt,
 
         if (!ngx_queue_empty(&ctx->sent)) {
             ngx_quic_resend_frames(c, ctx);
+
+            ctx = ngx_quic_get_send_ctx(qc, ssl_encryption_handshake);
+            while (!ngx_queue_empty(&ctx->sent)) {
+                ngx_quic_resend_frames(c, ctx);
+            }
         }
     }