]> git.kaiwu.me - nginx.git/commitdiff
Do not close QUIC sockets in ngx_close_listening_sockets().
authorSergey Kandaurov <pluknet@nginx.com>
Tue, 23 Jun 2020 08:57:00 +0000 (11:57 +0300)
committerSergey Kandaurov <pluknet@nginx.com>
Tue, 23 Jun 2020 08:57:00 +0000 (11:57 +0300)
This breaks graceful shutdown of QUIC connections in terms of quic-transport.

src/core/ngx_connection.c
src/core/ngx_connection.h
src/http/ngx_http.c

index 9ec1cd7aca6147fa4ba7214f3990754a3bf7686f..5bae54502f55275327d1ca18d8bec28c35c5aa6e 100644 (file)
@@ -1034,6 +1034,10 @@ ngx_close_listening_sockets(ngx_cycle_t *cycle)
     ls = cycle->listening.elts;
     for (i = 0; i < cycle->listening.nelts; i++) {
 
+        if (ls[i].quic) {
+            continue;
+        }
+
         c = ls[i].connection;
 
         if (c) {
index b3a36cf05014c7f370213071edfdb7115caad1c2..294d4b2125162c54b490f503e61b9e918307005b 100644 (file)
@@ -75,6 +75,7 @@ struct ngx_listening_s {
     unsigned            reuseport:1;
     unsigned            add_reuseport:1;
     unsigned            keepalive:2;
+    unsigned            quic:1;
 
     unsigned            deferred_accept:1;
     unsigned            delete_deferred:1;
index 1b5e387dbb8979cd1166894565272e59acf090c6..0a645722c5f50027a980ad1b67d7c6171d001cc3 100644 (file)
@@ -1797,6 +1797,10 @@ ngx_http_add_listening(ngx_conf_t *cf, ngx_http_conf_addr_t *addr)
 
     ls->wildcard = addr->opt.wildcard;
 
+#if (NGX_HTTP_SSL)
+    ls->quic = addr->opt.http3;
+#endif
+
     return ls;
 }