You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2016/01/17 21:32:34 UTC
trafficserver git commit: TS-4139: Send GOAWAY if it failed to change
stream state
Repository: trafficserver
Updated Branches:
refs/heads/master 93852b454 -> 925b9c17a
TS-4139: Send GOAWAY if it failed to change stream state
This is a fix for CID 1347871: Unchecked return value
This closes #426
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/925b9c17
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/925b9c17
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/925b9c17
Branch: refs/heads/master
Commit: 925b9c17a832c6800571a1bf13689d4e4efef35c
Parents: 93852b4
Author: Masakazu Kitajo <ma...@apache.org>
Authored: Sun Jan 17 22:03:35 2016 +0900
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Sun Jan 17 13:25:24 2016 -0700
----------------------------------------------------------------------
proxy/http2/Http2ConnectionState.cc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/925b9c17/proxy/http2/Http2ConnectionState.cc
----------------------------------------------------------------------
diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc
index 36969d3..8977ffc 100644
--- a/proxy/http2/Http2ConnectionState.cc
+++ b/proxy/http2/Http2ConnectionState.cc
@@ -1040,7 +1040,10 @@ Http2ConnectionState::send_rst_stream_frame(Http2StreamId id, Http2ErrorCode ec)
// change state to closed
Http2Stream *stream = find_stream(id);
if (stream != NULL) {
- stream->change_state(HTTP2_FRAME_TYPE_RST_STREAM, 0);
+ if (!stream->change_state(HTTP2_FRAME_TYPE_RST_STREAM, 0)) {
+ this->send_goaway_frame(stream->get_id(), HTTP2_ERROR_PROTOCOL_ERROR);
+ return;
+ }
}
// xmit event