This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/8.0.x by this push:
new 7cc535e Don't read frames after sending GOAWAY with an error code
7cc535e is described below
commit 7cc535e3ca280d394445fec8a31c348a44435e6b
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
(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 ec84aba..d727b10 100644
--- a/proxy/http2/Http2ClientSession.cc
+++ b/proxy/http2/Http2ClientSession.cc
@@ -510,6 +510,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) {