Chromium Code Reviews| 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) { |