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

maskit 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 00237a1  Don't read frames after sending GOAWAY with an error code
00237a1 is described below

commit 00237a141cdb6d9f2268080f03cb5f58ee32c7ec
Author: Masakazu Kitajo <[email protected]>
AuthorDate: Thu Apr 18 22:27:49 2019 +0900

    Don't read frames after sending GOAWAY with an error code
---
 proxy/http2/Http2ClientSession.cc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/proxy/http2/Http2ClientSession.cc 
b/proxy/http2/Http2ClientSession.cc
index eb644e1..35d60ac 100644
--- a/proxy/http2/Http2ClientSession.cc
+++ b/proxy/http2/Http2ClientSession.cc
@@ -543,6 +543,11 @@ 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)) {
+      Http2SsnDebug("reading a frame has been canceled (%u)", 
connection_state.tx_error_code.code);
+      break;
+    }
     // Return if there was an error
     Http2ErrorCode err;
     if (do_start_frame_read(err) < 0) {

Reply via email to