[PATCH 5 of 9] QUIC: do not send MAX_STREAMS in shutdown state

Roman Arutyunyan arut at nginx.com
Tue Aug 23 12:51:14 UTC 2022


# HG changeset patch
# User Roman Arutyunyan <arut at nginx.com>
# Date 1660909446 -14400
#      Fri Aug 19 15:44:06 2022 +0400
# Branch quic
# Node ID 8b0ffd69cca1a9aff606f1c8e416024b1e818a5e
# Parent  d95af176c8e90b6f5fbcc7650aab8c3fddcfac2b
QUIC: do not send MAX_STREAMS in shutdown state.

No more streams are expected from client.

diff --git a/src/event/quic/ngx_event_quic_streams.c b/src/event/quic/ngx_event_quic_streams.c
--- a/src/event/quic/ngx_event_quic_streams.c
+++ b/src/event/quic/ngx_event_quic_streams.c
@@ -1055,8 +1055,7 @@ ngx_quic_close_stream(ngx_quic_stream_t 
     ngx_rbtree_delete(&qc->streams.tree, &qs->node);
     ngx_queue_insert_tail(&qc->streams.free, &qs->queue);
 
-    if (qc->closing) {
-        /* schedule handler call to continue ngx_quic_close_connection() */
+    if (qc->closing || qc->shutdown) {
         ngx_post_event(pc->read, &ngx_posted_events);
         return NGX_OK;
     }
@@ -1082,10 +1081,6 @@ ngx_quic_close_stream(ngx_quic_stream_t 
         ngx_quic_queue_frame(qc, frame);
     }
 
-    if (qc->shutdown) {
-        ngx_post_event(pc->read, &ngx_posted_events);
-    }
-
     return NGX_OK;
 }
 



More information about the nginx-devel mailing list