aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2021-02-21 16:43:39 +0100
committerRené 'Necoro' Neumann <necoro@necoro.eu>2021-02-21 17:43:31 +0100
commit1f03f19402266c63bbb7120f50caacf3f6f79a36 (patch)
treedbdfb686393d7d9a924afca77433c507bf311e83 /internal
parent3e9a26af773f5025e1540f9be5da952c448f1edd (diff)
downloadfeed2imap-go-1f03f19402266c63bbb7120f50caacf3f6f79a36.tar.gz
feed2imap-go-1f03f19402266c63bbb7120f50caacf3f6f79a36.tar.bz2
feed2imap-go-1f03f19402266c63bbb7120f50caacf3f6f79a36.zip
#25 Check for folder again while locking
Diffstat (limited to '')
-rw-r--r--internal/imap/mailboxes.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/imap/mailboxes.go b/internal/imap/mailboxes.go
index f1dc6c6..25bf087 100644
--- a/internal/imap/mailboxes.go
+++ b/internal/imap/mailboxes.go
@@ -26,6 +26,14 @@ func (mbs *mailboxes) unlocking(elem Folder) {
func (mbs *mailboxes) locking(elem Folder) bool {
mbs.mu.Lock()
+
+ // check again, if the folder has been created in the meantime
+ _, ok := mbs.mb[elem.str]
+ if ok {
+ mbs.mu.Unlock()
+ return true
+ }
+
ch, ok := mbs.changeLocks[elem.str]
if !ok {
ch = make(chan struct{})
=4574618385d93a71b37a816cb341444efd7440a2&follow=1'>Remove live ebuild of radicaleRené Neumann3-43/+0 2012-07-13Bump radicale to 0.7René Neumann2-5/+11 2012-05-07add epatch_user to cairoRené Neumann2-1/+2 2012-05-07Cairo from portage treeRené Neumann6-309/+63 2012-02-18Removed outdated packagesRené 'Necoro' Neumann19-883/+0 2012-02-17MltonRené Neumann2-0/+62 2012-02-17Removed virtualboxRené Neumann21-993/+0 2012-01-30BumpRené 'Necoro' Neumann1-3/+3 2012-01-30BumpRené 'Necoro' Neumann1-0/+0 2012-01-30Apply changes from bugs.gentoo.orgRené 'Necoro' Neumann2-1/+19 2012-01-11diffarrayRené Neumann3-0/+37 2012-01-10Remove patched dovecot. Changes are upstreamRené 'Necoro' Neumann8-907/+0 2012-01-10Remove emacs variant -- this is now tracked in patchesRené 'Necoro' Neumann3-363/+0 2011-11-06amd64 for fcgi-cgiRené 'Necoro' Neumann2-2/+2 2011-11-06Forgot dovecot init-fileRené 'Necoro' Neumann1-0/+1