commit b938631c83089e7ffe091c1b5ebe47aae45a3509
Author: Mike Perry <[email protected]>
Date: Thu Jun 5 03:48:45 2014 -0700
fixup! Randomize HTTP request order and pipeline depth.
Bug 10355 testing: Randomize pipeline depth regardless of aggressive
setting.
---
netwerk/protocol/http/nsHttpConnectionMgr.cpp | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/netwerk/protocol/http/nsHttpConnectionMgr.cpp
b/netwerk/protocol/http/nsHttpConnectionMgr.cpp
index a02fe07..931278c 100644
--- a/netwerk/protocol/http/nsHttpConnectionMgr.cpp
+++ b/netwerk/protocol/http/nsHttpConnectionMgr.cpp
@@ -3198,11 +3198,13 @@
nsConnectionEntry::nsConnectionEntry(nsHttpConnectionInfo *ci)
, mPreferIPv6(false)
{
NS_ADDREF(mConnInfo);
+
+ // Randomize the pipeline depth (3..12)
+ mGreenDepth = gHttpHandler->GetMaxOptimisticPipelinedRequests()
+ + rand() % (gHttpHandler->GetMaxPipelinedRequests()
+ -
gHttpHandler->GetMaxOptimisticPipelinedRequests());
+
if (gHttpHandler->GetPipelineAggressive()) {
- // Randomize the pipeline depth (3..12)
- mGreenDepth = gHttpHandler->GetMaxOptimisticPipelinedRequests()
- + rand() % (gHttpHandler->GetMaxPipelinedRequests()
- -
gHttpHandler->GetMaxOptimisticPipelinedRequests());
mPipelineState = PS_GREEN;
}
_______________________________________________
tor-commits mailing list
[email protected]
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits