diff options
author | erikchen@google.com <erikchen@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-09 20:17:00 +0000 |
---|---|---|
committer | erikchen@google.com <erikchen@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-09 20:17:00 +0000 |
commit | b278eb730737f29cf3c07ea1f40456eb41279622 (patch) | |
tree | 6570f03b052a227fee4d146c16380f07e8006110 /net/spdy/spdy_session_pool.cc | |
parent | 1e014a9d7d67b60be6b96310ef4d84ccd8c72e0a (diff) | |
download | chromium_src-b278eb730737f29cf3c07ea1f40456eb41279622.zip chromium_src-b278eb730737f29cf3c07ea1f40456eb41279622.tar.gz chromium_src-b278eb730737f29cf3c07ea1f40456eb41279622.tar.bz2 |
Client attempts to start a new spdy transaction with a session that is closing down.
TEST=net_unittests
BUG=47455,48503
Review URL: http://codereview.chromium.org/2841029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52001 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_session_pool.cc')
-rw-r--r-- | net/spdy/spdy_session_pool.cc | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/net/spdy/spdy_session_pool.cc b/net/spdy/spdy_session_pool.cc index 21fa0ac..8caa040 100644 --- a/net/spdy/spdy_session_pool.cc +++ b/net/spdy/spdy_session_pool.cc @@ -122,19 +122,26 @@ void SpdySessionPool::RemoveSessionList(const HostPortPair& host_port_pair) { } } -void SpdySessionPool::RemoveAllSessions(bool close) { - while (sessions_.size()) { +void SpdySessionPool::ClearSessions() { + while (!sessions_.empty()) { SpdySessionList* list = sessions_.begin()->second; DCHECK(list); sessions_.erase(sessions_.begin()->first); while (list->size()) { - scoped_refptr<SpdySession> session = list->front(); list->pop_front(); - if (close) - session->CloseAllStreams(net::ERR_ABORTED); } delete list; } } +void SpdySessionPool::CloseAllSessions() { + while (!sessions_.empty()) { + SpdySessionList* list = sessions_.begin()->second; + DCHECK(list); + const scoped_refptr<SpdySession>& session = list->front(); + DCHECK(session); + session->CloseSessionOnError(net::ERR_ABORTED); + } +} + } // namespace net |