| Index: net/spdy/spdy_session.cc
|
| diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
|
| index 9508f0e6af47da6326ecb732c14bdd86e3a4d314..ff45287028a45c683bbd6c541d2e97826e510824 100644
|
| --- a/net/spdy/spdy_session.cc
|
| +++ b/net/spdy/spdy_session.cc
|
| @@ -2285,6 +2285,10 @@ void SpdySession::OnGoAway(SpdyStreamId last_accepted_stream_id,
|
| active_streams_.size(),
|
| unclaimed_pushed_streams_.size(),
|
| status));
|
| + GoAway(last_accepted_stream_id, ERR_ABORTED);
|
| +}
|
| +
|
| +void SpdySession::GoAway(SpdyStreamId last_accepted_stream_id, Error err) {
|
| if (availability_state_ < STATE_GOING_AWAY) {
|
| availability_state_ = STATE_GOING_AWAY;
|
| // |pool_| will be NULL when |InitializeWithSocket()| is in the
|
| @@ -2292,7 +2296,7 @@ void SpdySession::OnGoAway(SpdyStreamId last_accepted_stream_id,
|
| if (pool_)
|
| pool_->MakeSessionUnavailable(GetWeakPtr());
|
| }
|
| - StartGoingAway(last_accepted_stream_id, ERR_ABORTED);
|
| + StartGoingAway(last_accepted_stream_id, err);
|
| // 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
|
| @@ -2300,6 +2304,13 @@ void SpdySession::OnGoAway(SpdyStreamId last_accepted_stream_id,
|
| MaybeFinishGoingAway();
|
| }
|
|
|
| +void SpdySession::Deprecate(Error err) {
|
| + SpdyStreamId highest_active_stream_id = 0;
|
| + if (active_streams_.size())
|
| + highest_active_stream_id = active_streams_.rbegin()->first;
|
| + GoAway(highest_active_stream_id, err);
|
| +}
|
| +
|
| void SpdySession::OnPing(uint32 unique_id) {
|
| CHECK(in_io_loop_);
|
|
|
|
|