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 ee9399a06570c22654d459c971d10e494b93cc61
Author: Masaori Koshiba <[email protected]>
AuthorDate: Fri Jun 14 09:39:48 2019 +0900

    HTTP/2: cancel reading buffer when ATS received GOAWAY
    
    (cherry picked from commit 204749518b8265ecf466187ccdf6b6f881d9724f)
    
    Conflicts:
        proxy/http2/Http2ClientSession.cc
---
 proxy/http2/Http2ClientSession.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/proxy/http2/Http2ClientSession.cc 
b/proxy/http2/Http2ClientSession.cc
index e7776e3..cab22ee 100644
--- a/proxy/http2/Http2ClientSession.cc
+++ b/proxy/http2/Http2ClientSession.cc
@@ -566,8 +566,9 @@ Http2ClientSession::state_process_frame_read(int event, VIO 
*vio, bool inside_fr
   }
 
   while (this->sm_reader->read_avail() >= (int64_t)HTTP2_FRAME_HEADER_LEN) {
-    // Cancel reading if there was an error
-    if (connection_state.tx_error_code.code != 
static_cast<uint32_t>(Http2ErrorCode::HTTP2_ERROR_NO_ERROR)) {
+    // Cancel reading if there was an error or connection is closed
+    if (connection_state.tx_error_code.code != 
static_cast<uint32_t>(Http2ErrorCode::HTTP2_ERROR_NO_ERROR) ||
+        connection_state.is_state_closed()) {
       Http2SsnDebug("reading a frame has been canceled (%u)", 
connection_state.tx_error_code.code);
       break;
     }

Reply via email to