Commit 90a820bc authored by Mike Perry's avatar Mike Perry
Browse files

fixup! Randomize HTTP request order and pipeline depth.

Bug 10355 testing: Randomize pipeline depth regardless of aggressive setting.
parent dab55651
......@@ -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;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment