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

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

commit 9c28e3ff5810c75373d3935c34174e02b5792108
Author: Masaori Koshiba <[email protected]>
AuthorDate: Thu Aug 15 14:46:29 2019 +0900

    Record HttpSM Id on new transaction
    
    There is a path of Http2Stream::update_read_request() starts shutdown
    and make current_reader nullptr. Copying HttpSM Id from current_reader
    should be done before the update_read_request() call.
    
    (cherry picked from commit 296cf29b02bf3aba6d22a4a7e66ae5441f5a212c)
---
 proxy/http2/Http2Stream.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/proxy/http2/Http2Stream.cc b/proxy/http2/Http2Stream.cc
index 122dcff..73d7a93 100644
--- a/proxy/http2/Http2Stream.cc
+++ b/proxy/http2/Http2Stream.cc
@@ -148,6 +148,9 @@ Http2Stream::decode_header_blocks(HpackHandle 
&hpack_handle, uint32_t maximum_ta
 void
 Http2Stream::send_request(Http2ConnectionState &cstate)
 {
+  ink_release_assert(this->current_reader != nullptr);
+  this->_http_sm_id = this->current_reader->sm_id;
+
   // Convert header to HTTP/1.1 format
   http2_convert_header_from_2_to_1_1(&_req_header);
 
@@ -175,7 +178,6 @@ Http2Stream::send_request(Http2ConnectionState &cstate)
 
   // Is there a read_vio request waiting?
   this->update_read_request(INT64_MAX, true);
-  this->_http_sm_id = this->current_reader->sm_id;
 }
 
 bool

Reply via email to