зеркало из https://github.com/mozilla/gecko-dev.git
Fix 32395. The change in behavior of SetReuseConnection had cause ftp
handler to leak.
This commit is contained in:
Родитель
0a83713ee9
Коммит
c41f6dc16a
|
@ -422,7 +422,6 @@ nsresult nsSocketTransport::Process(PRInt16 aSelectFlags)
|
|||
if (NS_SUCCEEDED (IsAlive (0, &isalive)) && !isalive)
|
||||
{
|
||||
CloseConnection ();
|
||||
mCloseConnectionOnceDone = PR_FALSE;
|
||||
|
||||
mCurrentState = eSocketState_WaitConnect;
|
||||
mLastReuseCount = mReuseCount;
|
||||
|
@ -1293,6 +1292,9 @@ NS_IMPL_THREADSAFE_ISUPPORTS5(nsSocketTransport,
|
|||
NS_IMETHODIMP
|
||||
nsSocketTransport::GetReuseConnection(PRBool *_retval)
|
||||
{
|
||||
if (_retval == NULL)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
*_retval = !mCloseConnectionOnceDone;
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -1300,10 +1302,11 @@ nsSocketTransport::GetReuseConnection(PRBool *_retval)
|
|||
NS_IMETHODIMP
|
||||
nsSocketTransport::SetReuseConnection(PRBool aReuse)
|
||||
{
|
||||
mCloseConnectionOnceDone = !aReuse;
|
||||
|
||||
if (aReuse)
|
||||
{
|
||||
mReuseCount++;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче