summary refs log tree commit diff stats
path: root/worker/imap/list.go
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-06-14 10:49:31 -0400
committerDrew DeVault <sir@cmpwn.com>2019-06-14 10:49:31 -0400
commitfd0265d917edaf6d9448bdf9df2708f5de380cab (patch)
treecb1db57605fe35c0b2a843c6d6dd59281d86a383 /worker/imap/list.go
parent99c363b7249d52d484b736ef24dbc5bff70b86ae (diff)
downloadaerc-fd0265d917edaf6d9448bdf9df2708f5de380cab.tar.gz
imap: block until directory list is fully received
This fixes issues with INBOX mysteriously not being present at times
Diffstat (limited to 'worker/imap/list.go')
-rw-r--r--worker/imap/list.go1
1 files changed, 1 insertions, 0 deletions
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)
 	}