mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 19:25:43 +00:00
Back out Bug #115349 --> This randomly causes deadlock on quit, prevent the process from terminating. It also causes long freezes in the UI when trying to reconnect to a disconnected folder.
sr=bienvenu
This commit is contained in:
parent
0c7d2afd1a
commit
11a6951114
@ -804,7 +804,6 @@ 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
|
||||
@ -997,18 +996,28 @@ nsImapProtocol::TellThreadToDie(PRBool isSafeToClose)
|
||||
nsImapServerResponseParser::kFolderSelected && isSafeToClose;
|
||||
nsCString command;
|
||||
nsresult rv = NS_OK;
|
||||
PRUint32 writeCount;
|
||||
|
||||
if (m_currentServerCommandTagNumber > 0)
|
||||
{
|
||||
if (closeNeeded && GetDeleteIsMoveToTrash() &&
|
||||
TestFlag(IMAP_CONNECTION_IS_OPEN) && m_outputStream)
|
||||
{
|
||||
Close();
|
||||
IncrementCommandTagNumber();
|
||||
command = GetServerCommandTag();
|
||||
command.Append(" close" CRLF);
|
||||
rv = m_outputStream->Write(command.get(), command.Length(),
|
||||
&writeCount);
|
||||
Log("SendData", "TellThreadToDie", command.get());
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(rv) && TestFlag(IMAP_CONNECTION_IS_OPEN) && m_outputStream)
|
||||
{
|
||||
Logout();
|
||||
IncrementCommandTagNumber();
|
||||
command = GetServerCommandTag();
|
||||
command.Append(" logout" CRLF);
|
||||
rv = m_outputStream->Write(command.get(), command.Length(),
|
||||
&writeCount);
|
||||
Log("SendData", "TellThreadToDie", command.get());
|
||||
}
|
||||
}
|
||||
@ -5362,7 +5371,7 @@ void nsImapProtocol::Logout()
|
||||
ProgressEventFunctionUsingId (IMAP_STATUS_LOGGING_OUT);
|
||||
|
||||
/******************************************************************
|
||||
* due to the undo functionality we cannot issue a close when logout; there
|
||||
* due to the undo functionality we cannot issule a close when logout; there
|
||||
* is no way to do an undo if the message has been permanently expunge
|
||||
* jt - 07/12/1999
|
||||
|
||||
@ -5381,8 +5390,8 @@ void nsImapProtocol::Logout()
|
||||
|
||||
nsresult rv = SendData(command.get());
|
||||
// the socket may be dead before we read the response, so drop it.
|
||||
if (NS_SUCCEEDED(rv))
|
||||
ParseIMAPandCheckForNewMail();
|
||||
if (NS_SUCCEEDED(rv))
|
||||
ParseIMAPandCheckForNewMail();
|
||||
}
|
||||
|
||||
void nsImapProtocol::Noop()
|
||||
@ -7001,7 +7010,7 @@ void nsImapProtocol::Check()
|
||||
{
|
||||
//ProgressUpdateEvent("Checking mailbox...");
|
||||
|
||||
IncrementCommandTagNumber();
|
||||
IncrementCommandTagNumber();
|
||||
|
||||
nsCString command(GetServerCommandTag());
|
||||
command.Append(" check" CRLF);
|
||||
|
Loading…
Reference in New Issue
Block a user