Bug 1777848 - Don't create speculative connection during shutdown, r=necko-reviewers,dragana

Differential Revision: https://phabricator.services.mozilla.com/D151145
This commit is contained in:
Kershaw Chang 2022-07-20 11:59:12 +00:00
Родитель f2dbdbfde7
Коммит 4ba91ba30e
1 изменённых файлов: 5 добавлений и 0 удалений

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

@ -3353,6 +3353,11 @@ void nsHttpConnectionMgr::DoSpeculativeConnectionInternal(
MOZ_ASSERT(OnSocketThread(), "not on socket thread");
MOZ_ASSERT(aTrans);
MOZ_ASSERT(aEnt);
if (!gHttpHandler->Active()) {
// Do nothing if we are shutting down.
return;
}
if (aFetchHTTPSRR && NS_SUCCEEDED(aTrans->FetchHTTPSRR())) {
// nsHttpConnectionMgr::DoSpeculativeConnection will be called again when
// HTTPS RR is available.