changeset 8660:6201cef77b1d quic

QUIC: resend handshake packets along with initial. To speed up handshake, resend both initial and handshake packets if there's at least one unacknowledged initial packet.
author Roman Arutyunyan <arut@nginx.com>
date Tue, 08 Dec 2020 17:10:22 +0000
parents d9f673d18e9b
children 49efd27dace6
files src/event/ngx_event_quic.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/event/ngx_event_quic.c
+++ b/src/event/ngx_event_quic.c
@@ -3717,6 +3717,11 @@ ngx_quic_handle_crypto_frame(ngx_connect
 
         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);
+            }
         }
     }