aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2022-09-07 13:12:56 +0400
committerRoman Arutyunyan <arut@nginx.com>2022-09-07 13:12:56 +0400
commit21c34aadf9ff8c53f8b1413452895aa49d3fffa8 (patch)
tree2a7da94363f38d3d3e69fb4d3215eb8d161859ae /src
parenta2a513b93caeba13e408bfc80f8626f49550be40 (diff)
downloadnginx-21c34aadf9ff8c53f8b1413452895aa49d3fffa8.tar.gz
nginx-21c34aadf9ff8c53f8b1413452895aa49d3fffa8.zip
QUIC: do not send MAX_STREAMS in shutdown state.
No more streams are expected from client.
Diffstat (limited to 'src')
-rw-r--r--src/event/quic/ngx_event_quic_streams.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/event/quic/ngx_event_quic_streams.c b/src/event/quic/ngx_event_quic_streams.c
index 999bfccef..212d7edb3 100644
--- a/src/event/quic/ngx_event_quic_streams.c
+++ b/src/event/quic/ngx_event_quic_streams.c
@@ -1072,6 +1072,15 @@ ngx_quic_close_stream(ngx_quic_stream_t *qs)
return NGX_OK;
}
+ if (!pc->reusable && ngx_quic_can_shutdown(pc) == NGX_OK) {
+ ngx_reusable_connection(pc, 1);
+ }
+
+ if (qc->shutdown) {
+ ngx_quic_shutdown_quic(pc);
+ return NGX_OK;
+ }
+
if ((qs->id & NGX_QUIC_STREAM_SERVER_INITIATED) == 0) {
frame = ngx_quic_alloc_frame(pc);
if (frame == NULL) {
@@ -1093,14 +1102,6 @@ ngx_quic_close_stream(ngx_quic_stream_t *qs)
ngx_quic_queue_frame(qc, frame);
}
- if (!pc->reusable && ngx_quic_can_shutdown(pc) == NGX_OK) {
- ngx_reusable_connection(pc, 1);
- }
-
- if (qc->shutdown) {
- ngx_quic_shutdown_quic(pc);
- }
-
return NGX_OK;
}