mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 02:31:59 +00:00
attempt to fix stalling of imap urls due to race condition in url chaining, r=ducarroz, sr=sspitzer, a=asa 182808
This commit is contained in:
parent
fb86bcba83
commit
596d8eaa46
@ -465,6 +465,9 @@ nsImapIncomingServer::GetImapConnectionAndLoadUrl(nsIEventQueue * aClientEventQu
|
||||
m_urlConsumers.AppendElement((void*)aConsumer);
|
||||
NS_IF_ADDREF(aConsumer);
|
||||
PR_CExitMonitor(this);
|
||||
// let's try running it now - maybe the connection is free now.
|
||||
PRBool urlRun;
|
||||
rv = LoadNextQueuedUrl(&urlRun);
|
||||
}
|
||||
|
||||
return rv;
|
||||
|
@ -838,6 +838,7 @@ void nsImapProtocol::ReleaseUrlState()
|
||||
m_mockChannel->Close();
|
||||
m_mockChannel = nsnull;
|
||||
}
|
||||
m_channelContext = nsnull; // this might be the url - null it out before the final release of the url
|
||||
if (m_runningUrl)
|
||||
{
|
||||
nsCOMPtr<nsIMsgMailNewsUrl> mailnewsurl = do_QueryInterface(m_runningUrl);
|
||||
@ -868,7 +869,6 @@ void nsImapProtocol::ReleaseUrlState()
|
||||
m_imapExtensionSink = nsnull;
|
||||
m_imapMiscellaneousSink = nsnull;
|
||||
m_channelListener = nsnull;
|
||||
m_channelContext = nsnull;
|
||||
|
||||
m_channelInputStream = nsnull;
|
||||
m_channelOutputStream = nsnull;
|
||||
@ -1369,8 +1369,6 @@ PRBool nsImapProtocol::ProcessCurrentURL()
|
||||
// release the url as we are done with it...
|
||||
ReleaseUrlState();
|
||||
ResetProgressInfo();
|
||||
m_urlInProgress = PR_FALSE;
|
||||
ClearFlag(IMAP_CLEAN_UP_URL_STATE);
|
||||
|
||||
if (GetConnectionStatus() >= 0 && imapMailFolderSink)
|
||||
{
|
||||
@ -1386,6 +1384,8 @@ PRBool nsImapProtocol::ProcessCurrentURL()
|
||||
{
|
||||
if (GetConnectionStatus() >= 0)
|
||||
{
|
||||
ClearFlag(IMAP_CLEAN_UP_URL_STATE);
|
||||
m_urlInProgress = PR_FALSE;
|
||||
rv = m_imapServerSink->LoadNextQueuedUrl(&anotherUrlRun);
|
||||
SetFlag(IMAP_FIRST_PASS_IN_THREAD);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user