summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_session.cc
diff options
context:
space:
mode:
authorerikchen@google.com <erikchen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-10 00:04:18 +0000
committererikchen@google.com <erikchen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-10 00:04:18 +0000
commitc9336d2894620ea2fb48fd658dc1d26ef6b30ed1 (patch)
tree7818e367ecb5c31726ae1701bb61901ae108b1ce /net/spdy/spdy_session.cc
parent13ad1c76c511fba1901c077886665b175c9de5f2 (diff)
downloadchromium_src-c9336d2894620ea2fb48fd658dc1d26ef6b30ed1.zip
chromium_src-c9336d2894620ea2fb48fd658dc1d26ef6b30ed1.tar.gz
chromium_src-c9336d2894620ea2fb48fd658dc1d26ef6b30ed1.tar.bz2
SpdySession now closes all streams on receiving GoAway stream.
BUG=none TEST=none Review URL: http://codereview.chromium.org/3109001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55506 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_session.cc')
-rw-r--r--net/spdy/spdy_session.cc19
1 files changed, 18 insertions, 1 deletions
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index 816cb14..549dd53 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -1156,7 +1156,23 @@ void SpdySession::OnRst(const spdy::SpdyRstStreamControlFrame& frame) {
void SpdySession::OnGoAway(const spdy::SpdyGoAwayControlFrame& frame) {
LOG(INFO) << "Spdy GOAWAY for session[" << this << "] for " <<
host_port_pair().ToString();
-
+ if(!active_streams_.empty() || !unclaimed_pushed_streams_.empty()) {
+ LOG(ERROR) << "Spdy GOAWAY received with " << active_streams_.size()
+ << " streams still active.";
+ LOG(ERROR) << "Spdy GOAWAY received with "
+ << unclaimed_pushed_streams_.size()
+ << " unclaimed push streams.";
+ net_log_.AddEvent(
+ NetLog::TYPE_SPDY_SESSION_GOAWAY,
+ new NetLogIntegerParameter(
+ "number of streams still active: ",
+ active_streams_.size()));
+ net_log_.AddEvent(
+ NetLog::TYPE_SPDY_SESSION_GOAWAY,
+ new NetLogIntegerParameter(
+ "number of unclaimed push streams: ",
+ unclaimed_pushed_streams_.size()));
+ }
net_log_.AddEvent(
NetLog::TYPE_SPDY_SESSION_GOAWAY,
new NetLogIntegerParameter(
@@ -1164,6 +1180,7 @@ void SpdySession::OnGoAway(const spdy::SpdyGoAwayControlFrame& frame) {
frame.last_accepted_stream_id()));
RemoveFromPool();
+ CloseAllStreams(net::ERR_ABORTED);
// TODO(willchan): Cancel any streams that are past the GoAway frame's
// |last_accepted_stream_id|.