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

vmamidi 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 296cf29  Record HttpSM Id on new transaction
296cf29 is described below

commit 296cf29b02bf3aba6d22a4a7e66ae5441f5a212c
Author: Masaori Koshiba <masa...@apache.org>
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.
---
 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 9132f62..da681d3 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);
 
@@ -174,7 +177,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