зеркало из https://github.com/mozilla/gecko-dev.git
Bug 700402 - ABORT: syntimer not null, creting SYN retry timer after connection manager shutdown, r=mcmanus
This commit is contained in:
Родитель
9c37656296
Коммит
8bac226218
|
@ -1491,6 +1491,9 @@ nsHttpConnectionMgr::nsHalfOpenSocket::Abandon()
|
|||
{
|
||||
LOG(("nsHalfOpenSocket::Abandon [this=%p ent=%s]",
|
||||
this, mEnt->mConnInfo->Host()));
|
||||
|
||||
NS_ABORT_IF_FALSE(PR_GetCurrentThread() == gSocketThread, "wrong thread");
|
||||
|
||||
nsRefPtr<nsHalfOpenSocket> deleteProtector(this);
|
||||
|
||||
if (mStreamOut) {
|
||||
|
@ -1627,8 +1630,14 @@ nsHttpConnectionMgr::nsHalfOpenSocket::OnTransportStatus(nsITransport *trans,
|
|||
switch (status) {
|
||||
case nsISocketTransport::STATUS_CONNECTING_TO:
|
||||
// Passed DNS resolution, now trying to connect, start the backup timer
|
||||
// only prevent creating another backup transport
|
||||
if (!mBackupTransport && !mSynTimer)
|
||||
// only prevent creating another backup transport.
|
||||
// We also check for mEnt presence to not instantiate the timer after
|
||||
// this half open socket has already been abandoned. It may happen
|
||||
// when we get this notification right between main-thread calls to
|
||||
// nsHttpConnectionMgr::Shutdown and nsSocketTransportService::Shutdown
|
||||
// where the first abandones all half open socket instances and only
|
||||
// after that the second stops the socket thread.
|
||||
if (mEnt && !mBackupTransport && !mSynTimer)
|
||||
SetupBackupTimer();
|
||||
break;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче