Bug 1759292 - Clear the coalescing key mapping on hard-refresh r=necko-reviewers,kershaw

AltSvc mapping is cleared and if we do not clear the coalescing mapping it may happen that AltSvc cannot be validated because an alternative connection using DNS mapping already exists.

We clear AltSvc mapping because hard-refresh is a sign of a problem loading a page and we should start fresh, that should mean for the coalescing hashmap as well.

Differential Revision: https://phabricator.services.mozilla.com/D147827
This commit is contained in:
Dragana Damjanovic 2022-06-01 11:01:53 +00:00
Родитель 7a0f51774b
Коммит a240dc8f04
2 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -424,6 +424,8 @@ void ConnectionEntry::ClosePersistentConnections() {
for (int32_t i = 0; i < activeCount; i++) {
mActiveConns[i]->DontReuse();
}
mCoalescingKeys.Clear();
}
uint32_t ConnectionEntry::PruneDeadConnections() {

Просмотреть файл

@ -2286,6 +2286,8 @@ void nsHttpConnectionMgr::OnMsgDoShiftReloadConnectionCleanup(int32_t,
LOG(("nsHttpConnectionMgr::OnMsgDoShiftReloadConnectionCleanup\n"));
MOZ_ASSERT(OnSocketThread(), "not on socket thread");
mCoalescingHash.Clear();
nsHttpConnectionInfo* ci = static_cast<nsHttpConnectionInfo*>(param);
for (const auto& entry : mCT.Values()) {