trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject [trafficserver] 02/02: Don't read frames after sending GOAWAY with an error code
Date Thu, 16 May 2019 17:30:28 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit 0b7685afbe271c14a99f7cfeefb3f181e50fc89f
Author: Masakazu Kitajo <maskit@apache.org>
AuthorDate: Thu Apr 18 22:27:49 2019 +0900

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

diff --git a/proxy/http2/Http2ClientSession.cc b/proxy/http2/Http2ClientSession.cc
index f61cf70..8dc30c3 100644
--- a/proxy/http2/Http2ClientSession.cc
+++ b/proxy/http2/Http2ClientSession.cc
@@ -499,6 +499,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))
{
+      DebugHttp2Ssn("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) {


Mime
View raw message