fix hang on exit emptying imap trash when we've lost cached connections to server, sr=mscott possible fix for 355859 and others

This commit is contained in:
bienvenu%nventure.com 2006-10-08 18:16:36 +00:00
Родитель d29ac9de9e
Коммит 6d8b4d6404
1 изменённых файлов: 4 добавлений и 2 удалений

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

@ -1095,8 +1095,9 @@ PRBool PR_CALLBACK nsMsgAccountManager::cleanupOnExit(nsHashKey *aKey, void *aDa
PRBool inProgress = PR_FALSE;
if (cleanupInboxOnExit)
{
PRInt32 loopCount = 0; // used to break out after 5 seconds
accountManager->GetCleanupInboxInProgress(&inProgress);
while (inProgress)
while (inProgress && loopCount++ < 5000)
{
accountManager->GetCleanupInboxInProgress(&inProgress);
PR_CEnterMonitor(folder);
@ -1108,7 +1109,8 @@ PRBool PR_CALLBACK nsMsgAccountManager::cleanupOnExit(nsHashKey *aKey, void *aDa
if (emptyTrashOnExit)
{
accountManager->GetEmptyTrashInProgress(&inProgress);
while (inProgress)
PRInt32 loopCount = 0;
while (inProgress && loopCount++ < 5000)
{
accountManager->GetEmptyTrashInProgress(&inProgress);
PR_CEnterMonitor(folder);