This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 091c0847c8d8975edcd49d0640161283aedbcb30
Author: Masaori Koshiba <masa...@apache.org>
AuthorDate: Fri Apr 5 15:52:32 2024 +0900

    http2: close stream on sending RST_STREAM (#11209)
    
    (cherry picked from commit b5dca0dc6567fdc47f79af94b1b1ce0b085e3804)
---
 src/proxy/http2/Http2ConnectionState.cc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/proxy/http2/Http2ConnectionState.cc 
b/src/proxy/http2/Http2ConnectionState.cc
index 1a0306ef5c..f5bc102c16 100644
--- a/src/proxy/http2/Http2ConnectionState.cc
+++ b/src/proxy/http2/Http2ConnectionState.cc
@@ -1437,6 +1437,12 @@ Http2ConnectionState::rcv_frame(const Http2Frame *frame)
               client_ip, session->get_connection_id(), stream_id, error.msg);
       }
       this->send_rst_stream_frame(stream_id, error.code);
+
+      // start closing stream on stream error
+      if (Http2Stream *stream = find_stream(stream_id); stream != nullptr) {
+        ink_assert(stream->get_state() == 
Http2StreamState::HTTP2_STREAM_STATE_CLOSED);
+        stream->initiating_close();
+      }
     }
   }
 }

Reply via email to