From 87dda9f5e1f1366d34c569f7642f0f55b6734c65 Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Tue, 10 Aug 1999 18:32:34 +0000 Subject: [PATCH] Until I can fix a threading problem...be sure to open the socket from the ui thread so events get pumped on the ui thread. --- mailnews/imap/src/nsImapProtocol.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/mailnews/imap/src/nsImapProtocol.cpp b/mailnews/imap/src/nsImapProtocol.cpp index d830be1486a1..0d7e84340f50 100644 --- a/mailnews/imap/src/nsImapProtocol.cpp +++ b/mailnews/imap/src/nsImapProtocol.cpp @@ -804,14 +804,7 @@ void nsImapProtocol::EstablishServerConnection() void nsImapProtocol::ProcessCurrentURL() { PRBool logonFailed = FALSE; - - if (!TestFlag(IMAP_CONNECTION_IS_OPEN)) - { - nsCOMPtr sprts = do_QueryInterface (m_runningUrl); - m_channel->AsyncRead(0, -1, sprts,this /* stream observer */); - SetFlag(IMAP_CONNECTION_IS_OPEN); - } - + // we used to check if the current running url was // Reinitialize the parser GetServerStateParser().InitializeState(); @@ -1097,7 +1090,12 @@ nsresult nsImapProtocol::LoadUrl(nsIURI * aURL, nsISupports * aConsumer) // we're pulling out a selected state connection, but maybe we // can get away with this. m_needNoop = (imapAction == nsIImapUrl::nsImapSelectFolder || imapAction == nsIImapUrl::nsImapDeleteAllMsgs); - + if (!TestFlag(IMAP_CONNECTION_IS_OPEN)) + { + nsCOMPtr sprts = do_QueryInterface (m_runningUrl); + m_channel->AsyncRead(0, -1, sprts,this /* stream observer */); + SetFlag(IMAP_CONNECTION_IS_OPEN); + } // We now have a url to run so signal the monitor for url ready to be processed... PR_EnterMonitor(m_urlReadyToRunMonitor); m_nextUrlReadyToRun = PR_TRUE;