From 63150aa200bd8ac6b0124dace88c01970517c1b8 Mon Sep 17 00:00:00 2001 From: Masaori Koshiba Date: Thu, 15 Aug 2019 14:46:29 +0900 Subject: [PATCH] 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 9132f62b386..da681d3d3ae 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