[PATCH 2 of 6] HTTP/3: moved variable initialization

Roman Arutyunyan arut at nginx.com
Thu Sep 14 10:17:05 UTC 2023


# HG changeset patch
# User Roman Arutyunyan <arut at nginx.com>
# Date 1694613433 -14400
#      Wed Sep 13 17:57:13 2023 +0400
# Node ID 6d3ca6f8db357a1db267978f730875e51e87c608
# Parent  ad3d34ddfdcc88a9e002c55db0ea7df970dfb786
HTTP/3: moved variable initialization.

diff --git a/src/http/v3/ngx_http_v3_request.c b/src/http/v3/ngx_http_v3_request.c
--- a/src/http/v3/ngx_http_v3_request.c
+++ b/src/http/v3/ngx_http_v3_request.c
@@ -67,7 +67,6 @@ ngx_http_v3_init_stream(ngx_connection_t
     hc->ssl = 1;
 
     clcf = ngx_http_get_module_loc_conf(hc->conf_ctx, ngx_http_core_module);
-    h3scf = ngx_http_get_module_srv_conf(hc->conf_ctx, ngx_http_v3_module);
 
     if (c->quic == NULL) {
         if (ngx_http_v3_init_session(c) != NGX_OK) {
@@ -75,7 +74,9 @@ ngx_http_v3_init_stream(ngx_connection_t
             return;
         }
 
+        h3scf = ngx_http_get_module_srv_conf(hc->conf_ctx, ngx_http_v3_module);
         h3scf->quic.idle_timeout = clcf->keepalive_timeout;
+
         ngx_quic_run(c, &h3scf->quic);
         return;
     }


More information about the nginx-devel mailing list