From a6a7e73f804c4f9f614e4183d87988fdd0edd8e7 Mon Sep 17 00:00:00 2001 From: Peter Kosyh Date: Sun, 18 Nov 2018 19:18:40 +0300 Subject: [PATCH] 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 --- .../mail_daemon/inbound_protocols/imap/IMAPProtocol.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPProtocol.cpp b/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPProtocol.cpp index 6a2e80c2fe..2af060538f 100644 --- a/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPProtocol.cpp +++ b/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPProtocol.cpp @@ -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(); - } }