Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(499)

Unified Diff: net/spdy/spdy_session.cc

Issue 129873010: Deprecate instead of close SPDY sessions upon network change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename MakeUnavailable and update comment Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/spdy/spdy_session.cc
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index 9508f0e6af47da6326ecb732c14bdd86e3a4d314..afa88d504f8a42edfa569cf3dd5a16e82b0c9f4f 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -2285,6 +2285,16 @@ void SpdySession::OnGoAway(SpdyStreamId last_accepted_stream_id,
active_streams_.size(),
unclaimed_pushed_streams_.size(),
status));
+ MakeUnavailable();
+ StartGoingAway(last_accepted_stream_id, ERR_ABORTED);
+ // This is to handle the case when we already don't have any active
+ // streams (i.e., StartGoingAway() did nothing). Otherwise, we have
+ // active streams and so the last one being closed will finish the
+ // going away process (see DeleteStream()).
+ MaybeFinishGoingAway();
+}
+
+void SpdySession::MakeUnavailable() {
akalin 2014/01/29 23:26:18 move this under CloseSessionAndError to match head
if (availability_state_ < STATE_GOING_AWAY) {
availability_state_ = STATE_GOING_AWAY;
// |pool_| will be NULL when |InitializeWithSocket()| is in the
@@ -2292,12 +2302,6 @@ void SpdySession::OnGoAway(SpdyStreamId last_accepted_stream_id,
if (pool_)
pool_->MakeSessionUnavailable(GetWeakPtr());
}
- StartGoingAway(last_accepted_stream_id, ERR_ABORTED);
- // This is to handle the case when we already don't have any active
- // streams (i.e., StartGoingAway() did nothing). Otherwise, we have
- // active streams and so the last one being closed will finish the
- // going away process (see DeleteStream()).
- MaybeFinishGoingAway();
}
void SpdySession::OnPing(uint32 unique_id) {

Powered by Google App Engine
This is Rietveld 408576698