trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sor...@apache.org
Subject [01/12] trafficserver git commit: TS-3519: HTTP/2 seeing a lot of GOAWAY frames being sent
Date Wed, 22 Apr 2015 16:55:20 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/5.3.x fa978afd7 -> 05aa7a3b3


TS-3519: HTTP/2 seeing a lot of GOAWAY frames being sent

(cherry picked from commit 7b5730b11e8ef9993137df08c7e8411877d74cfa)


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/c2d162c4
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/c2d162c4
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/c2d162c4

Branch: refs/heads/5.3.x
Commit: c2d162c4c7436db7cbb03873d1a42c9a6e2f1051
Parents: fa978afd7
Author: Bryan Call <bcall@apache.org>
Authored: Thu Apr 16 16:53:15 2015 -0500
Committer: Phil Sorber <sorber@apache.org>
Committed: Fri Apr 17 07:38:40 2015 -0600

----------------------------------------------------------------------
 proxy/http2/Http2ConnectionState.cc | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c2d162c4/proxy/http2/Http2ConnectionState.cc
----------------------------------------------------------------------
diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc
index 1e50b57..2af2d6a 100644
--- a/proxy/http2/Http2ConnectionState.cc
+++ b/proxy/http2/Http2ConnectionState.cc
@@ -284,7 +284,7 @@ rcv_rst_stream_frame(Http2ClientSession &cs, Http2ConnectionState
&cstate, const
   DebugSsn(&cs, "http2_cs", "[%" PRId64 "] Received RST_STREAM frame.", cs.connection_id());
 
   Http2Stream *stream = cstate.find_stream(frame.header().streamid);
-  if (stream == NULL) {
+  if (frame.header().streamid == 0) {
     return HTTP2_ERROR_PROTOCOL_ERROR;
   }
 
@@ -292,7 +292,7 @@ rcv_rst_stream_frame(Http2ClientSession &cs, Http2ConnectionState
&cstate, const
     return HTTP2_ERROR_FRAME_SIZE_ERROR;
   }
 
-  if (!stream->change_state(frame.header().type, frame.header().flags)) {
+  if (stream != NULL && !stream->change_state(frame.header().type, frame.header().flags))
{
     // If a RST_STREAM frame identifying an idle stream is received, the
     // recipient MUST treat this as a connection error of type PROTOCOL_ERROR.
     return HTTP2_ERROR_PROTOCOL_ERROR;
@@ -306,7 +306,9 @@ rcv_rst_stream_frame(Http2ClientSession &cs, Http2ConnectionState
&cstate, const
 
   DebugSsn(&cs, "http2_cs", "[%" PRId64 "] RST_STREAM: Stream ID: %u, Error Code: %u)",
cs.connection_id(), stream->get_id(),
            rst_stream.error_code);
-  cstate.delete_stream(stream);
+  if (stream != NULL) {
+    cstate.delete_stream(stream);
+  }
 
   return HTTP2_ERROR_NO_ERROR;
 }


Mime
View raw message