Bug 1152047 - mozilla::net::nsWSAdmissionManager::GetSessionCount may deadlock during shutdown, r=mcmanus

This commit is contained in:
Michal Novotny 2015-05-19 11:35:33 +02:00
Родитель d2bef25deb
Коммит 796dc0f137
1 изменённых файлов: 7 добавлений и 3 удалений

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

@ -281,9 +281,13 @@ public:
}
}
// Delays disabled, or no previous failure, or we're reconnecting after scheduled
// delay interval has passed: connect.
ws->BeginOpen();
// Delays disabled, or no previous failure, or we're reconnecting after
// scheduled delay interval has passed: connect.
// Post an event to avoid potential re-entering of nsWSAdmissionManager and
// its lock.
NS_DispatchToMainThread(
NS_NewRunnableMethod(ws, &WebSocketChannel::BeginOpen),
NS_DISPATCH_NORMAL);
}
// Remove() also deletes all expired entries as it iterates: better for