~migadu/alps-devel

1

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

Details
Message ID
<8873f10284ab58eebfe4b08bbbfd20bb2b662fed.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)
        }
Details
Message ID
<c6cdaf2f0026e215749851f51aa2e477ac22dece.camel@meson.cc>
In-Reply-To
<8873f10284ab58eebfe4b08bbbfd20bb2b662fed.camel@meson.cc> (view parent)
DKIM signature
missing
Download raw message
For whatever reason this is not showing up as a patch. I've tried
though.
Reply to thread Export thread (mbox)