mail: revert ~IMAPProtocol

Waiting of worker threads in IMAPProtocol destructor introducred new deadlocks.

For example: fWorkerLock grabbed in destructor leads to deadlock with 
CheckSubscribedFoldersCommand (which grabs this lock with flock grabbed).

So, currently it should be reverted.

Change-Id: Ibc4b4f85300352e045d4ce72deb804e0e613f25c
Reviewed-on: https://review.haiku-os.org/714
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Peter Kosyh 2018-11-18 19:18:40 +03:00 committed by waddlesplash
parent 1f2ddf2fd0
commit a6a7e73f80

View File

@ -38,15 +38,6 @@ IMAPProtocol::IMAPProtocol(const BMailAccountSettings& settings)
IMAPProtocol::~IMAPProtocol()
{
MutexLocker locker(fWorkerLock);
for (int32 i = 0; i < fWorkers.CountItems(); i++)
fWorkers.ItemAt(i)->Quit();
int tries = 10;
while (fWorkers.CountItems() > 0 && --tries > 0) {
locker.Unlock();
snooze(500000);
locker.Lock();
}
}