fix for imap server problems because we were disconnecting while idle w/o ending idle or logging out, sr=mscott 236708

This commit is contained in:
bienvenu%nventure.com 2004-03-07 21:09:02 +00:00
Родитель ffc743e9dc
Коммит a6a5e6121c
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -809,6 +809,7 @@ nsresult nsImapProtocol::SetupWithUrl(nsIURI * aURL, nsISupports* aConsumer)
// open buffered, blocking output stream
rv = m_transport->OpenOutputStream(nsITransport::OPEN_BLOCKING, 0, 0, getter_AddRefs(m_outputStream));
if (NS_FAILED(rv)) return rv;
SetFlag(IMAP_CONNECTION_IS_OPEN);
}
}
} // if m_runningUrl
@ -1024,6 +1025,9 @@ nsImapProtocol::TellThreadToDie(PRBool isSafeToClose)
if (m_currentServerCommandTagNumber > 0)
{
if (TestFlag(IMAP_CONNECTION_IS_OPEN) && m_idle)
EndIdle();
if (closeNeeded && GetDeleteIsMoveToTrash() &&
TestFlag(IMAP_CONNECTION_IS_OPEN) && m_outputStream)
{