# HG changeset patch # User Sergey Kandaurov # Date 1592902620 -10800 # Node ID db8fe75c9c7afb97e83e812b69189d0f2405b9d2 # Parent f9592e804834a616a170b407796463b8daf5630e Do not close QUIC sockets in ngx_close_listening_sockets(). This breaks graceful shutdown of QUIC connections in terms of quic-transport. diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c --- a/src/core/ngx_connection.c +++ b/src/core/ngx_connection.c @@ -1034,6 +1034,10 @@ ngx_close_listening_sockets(ngx_cycle_t ls = cycle->listening.elts; for (i = 0; i < cycle->listening.nelts; i++) { + if (ls[i].quic) { + continue; + } + c = ls[i].connection; if (c) { diff --git a/src/core/ngx_connection.h b/src/core/ngx_connection.h --- a/src/core/ngx_connection.h +++ b/src/core/ngx_connection.h @@ -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; diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c --- a/src/http/ngx_http.c +++ b/src/http/ngx_http.c @@ -1797,6 +1797,10 @@ ngx_http_add_listening(ngx_conf_t *cf, n ls->wildcard = addr->opt.wildcard; +#if (NGX_HTTP_SSL) + ls->quic = addr->opt.http3; +#endif + return ls; }