GODT-2223: Fix mutex double lock

This commit is contained in:
James Houlahan
2023-01-18 15:08:14 +01:00
committed by Leander Beernaert
parent 59745e6fb6
commit faf28a6d4e

View File

@ -211,7 +211,6 @@ func (conn *imapConnector) updateLabel(ctx context.Context, labelID imap.Mailbox
} }
func (conn *imapConnector) updateFolder(ctx context.Context, labelID imap.MailboxID, name []string) error { func (conn *imapConnector) updateFolder(ctx context.Context, labelID imap.MailboxID, name []string) error {
return safe.LockRet(func() error {
var parentID string var parentID string
if len(name) > 1 { if len(name) > 1 {
@ -247,7 +246,6 @@ func (conn *imapConnector) updateFolder(ctx context.Context, labelID imap.Mailbo
conn.apiLabels[label.ID] = update conn.apiLabels[label.ID] = update
return nil return nil
}, conn.apiLabelsLock)
} }
// DeleteMailbox deletes the label with the given ID. // DeleteMailbox deletes the label with the given ID.