From fd0265d917edaf6d9448bdf9df2708f5de380cab Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Fri, 14 Jun 2019 10:49:31 -0400 Subject: imap: block until directory list is fully received This fixes issues with INBOX mysteriously not being present at times --- worker/imap/list.go | 1 + 1 file changed, 1 insertion(+) diff --git a/worker/imap/list.go b/worker/imap/list.go index 552fb45..a61ea06 100644 --- a/worker/imap/list.go +++ b/worker/imap/list.go @@ -46,6 +46,7 @@ func (imapw *IMAPWorker) handleListDirectories(msg *types.ListDirectories) { Error: err, }, nil) } else { + <-done imapw.worker.PostMessage( &types.Done{types.RespondTo(msg)}, nil) } -- cgit 1.4.1-2-gfad0