~migadu/alps-devel

[PATCH] imap.go: mbox chan is never emptied in getMailboxByType causing deadlock

Details
Message ID
<f7c9d6899e51e04fd9ede33fb9b9f57378051c98.camel@meson.cc>
DKIM signature
missing
Download raw message
From: Jerry <sourcehut@jerryxiao.cc>
Subject: [PATCH] imap.go: mbox chan is never emptied in
getMailboxByType causing deadlock

---
 plugins/base/imap.go | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/plugins/base/imap.go b/plugins/base/imap.go
index 2ca5a7e..2c1b0ac 100644
--- a/plugins/base/imap.go
+++ b/plugins/base/imap.go
@@ -140,6 +140,8 @@ func getMailboxByType(conn *imapclient.Client,
mboxType mailboxType) (*MailboxIn
 		}
 	}
 
+	for range ch {}
+
 	if err := <-done; err != nil {
 		return nil, fmt.Errorf("failed to get mailbox with
attribute %q: %v", attr, err)
 	}
-- 
2.40.0
Reply to thread Export thread (mbox)