| Index: net/spdy/spdy_session.cc
|
| diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
|
| index d338fcdf5fd98cdc0fc7b3588f460cd26e84ba3d..8fce1713236f09f3a59ed6fc892c6bf112fcb7ae 100644
|
| --- a/net/spdy/spdy_session.cc
|
| +++ b/net/spdy/spdy_session.cc
|
| @@ -420,6 +420,7 @@ net::Error SpdySession::InitializeWithSocket(
|
|
|
| state_ = CONNECTED;
|
| connection_.reset(connection);
|
| + connection_->AddLayeredPool(this);
|
| is_secure_ = is_secure;
|
| certificate_error_code_ = certificate_error_code;
|
|
|
| @@ -1214,6 +1215,18 @@ int SpdySession::GetLocalAddress(IPEndPoint* address) const {
|
| return connection_->socket()->GetLocalAddress(address);
|
| }
|
|
|
| +bool SpdySession::CloseOneIdleConnection() {
|
| + if (spdy_session_pool_ && num_active_streams() == 0) {
|
| + bool ret = HasOneRef();
|
| + // Will remove a reference to this.
|
| + RemoveFromPool();
|
| + // Since the underlying socket is only returned when |this| is destroyed
|
| + // we should only return true if RemoveFromPool() removed the last ref.
|
| + return ret;
|
| + }
|
| + return false;
|
| +}
|
| +
|
| void SpdySession::ActivateStream(SpdyStream* stream) {
|
| const SpdyStreamId id = stream->stream_id();
|
| DCHECK(!IsStreamActive(id));
|
|
|