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

Unified Diff: net/http/http_stream_request.cc

Issue 6340016: Prevent over-preconnecting when we already have a SpdySession. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
« no previous file with comments | « net/http/http_stream_factory_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_request.cc
diff --git a/net/http/http_stream_request.cc b/net/http/http_stream_request.cc
index d316fa5e4081dce5c8ef23c952bff7d439c73e5f..2765fa8b363f5f96f7b0fdbc1a897380af12bf41 100644
--- a/net/http/http_stream_request.cc
+++ b/net/http/http_stream_request.cc
@@ -492,8 +492,11 @@ int HttpStreamRequest::DoInitConnection() {
// Check first if we have a spdy session for this group. If so, then go
// straight to using that.
HostPortProxyPair pair(endpoint_, proxy_info()->proxy_server());
- if (!preconnect_delegate_ &&
- session_->spdy_session_pool()->HasSession(pair)) {
+ if (session_->spdy_session_pool()->HasSession(pair)) {
+ // If we're preconnecting, we're do need to preconnect anything since we
+ // already have a SpdySession, so we're done.
+ if (preconnect_delegate_)
+ return OK;
using_spdy_ = true;
next_state_ = STATE_CREATE_STREAM;
return OK;
« no previous file with comments | « net/http/http_stream_factory_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698