Chromium Code Reviews| Index: net/http/http_stream_request.cc |
| =================================================================== |
| --- net/http/http_stream_request.cc (revision 67728) |
| +++ net/http/http_stream_request.cc (working copy) |
| @@ -747,6 +747,10 @@ |
| // connection, or it might be a SPDY session through an HTTP or HTTPS proxy. |
| spdy_session = |
| spdy_pool->Get(pair, session_->mutable_spdy_settings(), net_log_); |
| + // We don't need our socket. |
| + if (connection_->socket()) |
| + connection_->socket()->Disconnect(); |
| + connection_->Reset(); |
| } else if (IsHttpsProxyAndHttpUrl()) { |
| // If we don't have a direct SPDY session, and we're using an HTTPS |
| // proxy, then we might have a SPDY session to the proxy |
| @@ -755,6 +759,10 @@ |
| if (spdy_pool->HasSession(pair)) { |
| spdy_session = |
| spdy_pool->Get(pair, session_->mutable_spdy_settings(), net_log_); |
| + // We don't need our socket. |
| + if (connection_->socket()) |
| + connection_->socket()->Disconnect(); |
| + connection_->Reset(); |
|
wtc
2010/12/01 02:41:39
You can avoid duplicating this code by moving it t
|
| } |
| direct = false; |
| } |