summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_session_pool.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/spdy/spdy_session_pool.cc')
-rw-r--r--net/spdy/spdy_session_pool.cc17
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