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

masaori pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new b5dca0dc65 http2: close stream on sending RST_STREAM (#11209)
b5dca0dc65 is described below

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

    http2: close stream on sending RST_STREAM (#11209)
---
 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 053599f10d..ca50283611 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