зеркало из https://github.com/mozilla/gecko-dev.git
bug 1094522 - only claim null transactions for your connection if KA eligible r=hurley CLOSED TREE
--HG-- extra : amend_source : 016cc2ea903e23dc5daaa3f875f96cc2e6bdb001
This commit is contained in:
Родитель
e62e008c7f
Коммит
84f7fbbc7a
|
@ -1500,15 +1500,19 @@ nsHttpConnectionMgr::MakeNewConnection(nsConnectionEntry *ent,
|
|||
}
|
||||
}
|
||||
|
||||
uint32_t activeLength = ent->mActiveConns.Length();
|
||||
for (uint32_t i = 0; i < activeLength; i++) {
|
||||
nsAHttpTransaction *activeTrans = ent->mActiveConns[i]->Transaction();
|
||||
NullHttpTransaction *nullTrans = activeTrans ? activeTrans->QueryNullTransaction() : nullptr;
|
||||
if (nullTrans && nullTrans->Claim()) {
|
||||
LOG(("nsHttpConnectionMgr::MakeNewConnection [ci = %s] "
|
||||
"Claiming a null transaction for later use\n",
|
||||
ent->mConnInfo->HashKey().get()));
|
||||
return NS_OK;
|
||||
// consider null transactions that are being used to drive the ssl handshake if
|
||||
// the transaction creating this connection can re-use persistent connections
|
||||
if (trans->Caps() & NS_HTTP_ALLOW_KEEPALIVE) {
|
||||
uint32_t activeLength = ent->mActiveConns.Length();
|
||||
for (uint32_t i = 0; i < activeLength; i++) {
|
||||
nsAHttpTransaction *activeTrans = ent->mActiveConns[i]->Transaction();
|
||||
NullHttpTransaction *nullTrans = activeTrans ? activeTrans->QueryNullTransaction() : nullptr;
|
||||
if (nullTrans && nullTrans->Claim()) {
|
||||
LOG(("nsHttpConnectionMgr::MakeNewConnection [ci = %s] "
|
||||
"Claiming a null transaction for later use\n",
|
||||
ent->mConnInfo->HashKey().get()));
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче