From e5c10dce5ee651d467e6e70952f539cd7bbb7d8f Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Tue, 8 Dec 2020 17:10:22 +0000 Subject: [PATCH] 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. --- src/event/ngx_event_quic.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/event/ngx_event_quic.c b/src/event/ngx_event_quic.c index 95f92ed21..ace2de749 100644 --- a/src/event/ngx_event_quic.c +++ b/src/event/ngx_event_quic.c @@ -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); + } } }