aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2023-09-21 19:32:38 +0400
committerRoman Arutyunyan <arut@nginx.com>2023-09-21 19:32:38 +0400
commit6ecf576e34c3780b6cdb3f509c89042aa411e3d2 (patch)
tree72f8afe38502b0ad177971d275adcbe15ff15fbd /src
parentec37134416d4fd98d8cb8f02776a711c50398684 (diff)
downloadnginx-6ecf576e34c3780b6cdb3f509c89042aa411e3d2.tar.gz
nginx-6ecf576e34c3780b6cdb3f509c89042aa411e3d2.zip
QUIC: do not call shutdown() when handshake is in progress.
Instead, when worker is shutting down and handshake is not yet completed, connection is terminated immediately. Previously the callback could be called while QUIC handshake was in progress and, what's more important, before the init() callback. Now it's postponed after init(). This change is a preparation to postponing HTTP/3 session creation to init().
Diffstat (limited to 'src')
-rw-r--r--src/event/quic/ngx_event_quic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/event/quic/ngx_event_quic.c b/src/event/quic/ngx_event_quic.c
index 0032a5505..b23434c0e 100644
--- a/src/event/quic/ngx_event_quic.c
+++ b/src/event/quic/ngx_event_quic.c
@@ -420,7 +420,7 @@ ngx_quic_input_handler(ngx_event_t *rev)
if (c->close) {
c->close = 0;
- if (!ngx_exiting) {
+ if (!ngx_exiting || !qc->streams.initialized) {
qc->error = NGX_QUIC_ERR_NO_ERROR;
qc->error_reason = "graceful shutdown";
ngx_quic_close_connection(c, NGX_ERROR);