[nginx] QUIC: do not call shutdown() when handshake is in progress.
Roman Arutyunyan
arut at nginx.com
Fri Sep 22 15:36:31 UTC 2023
details: https://hg.nginx.org/nginx/rev/dd5fd5719027
branches:
changeset: 9160:dd5fd5719027
user: Roman Arutyunyan <arut at nginx.com>
date: Thu Sep 21 19:32:38 2023 +0400
description:
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:
src/event/quic/ngx_event_quic.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 6d3ca6f8db35 -r dd5fd5719027 src/event/quic/ngx_event_quic.c
--- a/src/event/quic/ngx_event_quic.c Wed Sep 13 17:57:13 2023 +0400
+++ b/src/event/quic/ngx_event_quic.c Thu Sep 21 19:32:38 2023 +0400
@@ -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);
More information about the nginx-devel
mailing list