mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
bug 1217834 - buzzfeed packet loss r=dragana
This commit is contained in:
parent
139c78dcfa
commit
266550b577
@ -1428,8 +1428,8 @@ pref("network.http.diagnostics", false);
|
||||
|
||||
pref("network.http.pacing.requests.enabled", true);
|
||||
pref("network.http.pacing.requests.min-parallelism", 6);
|
||||
pref("network.http.pacing.requests.hz", 100);
|
||||
pref("network.http.pacing.requests.burst", 32);
|
||||
pref("network.http.pacing.requests.hz", 80);
|
||||
pref("network.http.pacing.requests.burst", 10);
|
||||
|
||||
// TCP Keepalive config for HTTP connections.
|
||||
pref("network.http.tcp_keepalive.short_lived_connections", true);
|
||||
|
@ -1748,11 +1748,19 @@ nsHttpConnectionMgr::TryDispatchTransaction(nsConnectionEntry *ent,
|
||||
// pacing so it can be found on cancel if necessary.
|
||||
// Transactions that cause blocking or bypass it (e.g. js/css) are not rate
|
||||
// limited.
|
||||
if (gHttpHandler->UseRequestTokenBucket() &&
|
||||
(mNumActiveConns >= mNumSpdyActiveConns) && // just check for robustness sake
|
||||
((mNumActiveConns - mNumSpdyActiveConns) >= gHttpHandler->RequestTokenBucketMinParallelism()) &&
|
||||
!(caps & (NS_HTTP_LOAD_AS_BLOCKING | NS_HTTP_LOAD_UNBLOCKED))) {
|
||||
if (!trans->TryToRunPacedRequest()) {
|
||||
if (gHttpHandler->UseRequestTokenBucket()) {
|
||||
// submit even whitelisted transactions to the token bucket though they will
|
||||
// not be slowed by it
|
||||
bool runNow = trans->TryToRunPacedRequest();
|
||||
if (!runNow) {
|
||||
if ((mNumActiveConns - mNumSpdyActiveConns) <=
|
||||
gHttpHandler->RequestTokenBucketMinParallelism()) {
|
||||
runNow = true; // white list it
|
||||
} else if (caps & (NS_HTTP_LOAD_AS_BLOCKING | NS_HTTP_LOAD_UNBLOCKED)) {
|
||||
runNow = true; // white list it
|
||||
}
|
||||
}
|
||||
if (!runNow) {
|
||||
LOG((" blocked due to rate pacing trans=%p\n", trans));
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user