]> git.kaiwu.me - nginx.git/commitdiff
Set default listen socket type in http.
authorRoman Arutyunyan <arut@nginx.com>
Tue, 1 Nov 2022 13:00:35 +0000 (17:00 +0400)
committerRoman Arutyunyan <arut@nginx.com>
Tue, 1 Nov 2022 13:00:35 +0000 (17:00 +0400)
The type field was added in 7999d3fbb765 at early stages of QUIC implementation
and was not initialized for default listen.  Missing initialization resulted in
default listen socket creation error.

src/http/ngx_http_core_module.c

index 78a9e5ea7d41228b49f4f0f1915c452c263eb05c..248fa80eac45ca8b60783549cc09d6090ede0192 100644 (file)
@@ -3008,6 +3008,7 @@ ngx_http_core_server(ngx_conf_t *cf, ngx_command_t *cmd, void *dummy)
         lsopt.socklen = sizeof(struct sockaddr_in);
 
         lsopt.backlog = NGX_LISTEN_BACKLOG;
+        lsopt.type = SOCK_STREAM;
         lsopt.rcvbuf = -1;
         lsopt.sndbuf = -1;
 #if (NGX_HAVE_SETFIB)