Bug 1824152: Return success if SocketThreadService was already shutting down r=necko-reviewers,valentin

Differential Revision: https://phabricator.services.mozilla.com/D173634
This commit is contained in:
Randell Jesup 2023-03-27 14:54:56 +00:00
Родитель 25db8907ea
Коммит 6ddf4bfdad
1 изменённых файлов: 2 добавлений и 5 удалений

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

@ -809,14 +809,11 @@ nsSocketTransportService::Shutdown(bool aXpcomShutdown) {
NS_ENSURE_STATE(NS_IsMainThread());
if (!mInitialized) {
if (!mInitialized || mShuttingDown) {
// We never inited, or shutdown has already started
return NS_OK;
}
if (mShuttingDown) {
return NS_ERROR_UNEXPECTED;
}
{
auto observersCopy = mShutdownObservers;
for (auto& observer : observersCopy) {