Bug 951293 - Fix speculative connection limiting. r=mcmanus
authorNicholas Hurley <hurley@todesschaf.org>
Wed, 29 Jan 2014 13:39:30 -0800
changeset 181890 d7cf9038a7ecd31969a5f15b6c80a4e28466be23
parent 181889 b3ccfb70c31bbc2da246dbad4d6dc09c07a0f9d8
child 181891 f45435b120c20658519155e19bc9b486318c0ea4
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus
bugs951293
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 951293 - Fix speculative connection limiting. r=mcmanus
netwerk/protocol/http/nsHttpConnectionMgr.cpp
--- a/netwerk/protocol/http/nsHttpConnectionMgr.cpp
+++ b/netwerk/protocol/http/nsHttpConnectionMgr.cpp
@@ -2595,17 +2595,18 @@ nsHttpConnectionMgr::OnMsgSpeculativeCon
 
     if (args->mOverridesOK) {
         parallelSpeculativeConnectLimit = args->mParallelSpeculativeConnectLimit;
         ignorePossibleSpdyConnections = args->mIgnorePossibleSpdyConnections;
         ignoreIdle = args->mIgnoreIdle;
     }
 
     if (mNumHalfOpenConns < parallelSpeculativeConnectLimit &&
-        (ignoreIdle || !ent->mIdleConns.Length()) &&
+        ((ignoreIdle && (ent->mIdleConns.Length() < parallelSpeculativeConnectLimit)) ||
+         !ent->mIdleConns.Length()) &&
         !RestrictConnections(ent, ignorePossibleSpdyConnections) &&
         !AtActiveConnectionLimit(ent, args->mTrans->Caps())) {
         CreateTransport(ent, args->mTrans, args->mTrans->Caps(), true);
     }
     else {
         LOG(("  Transport not created due to existing connection count\n"));
     }
 }