Add missing wlocks around message delivery to account, mostly for tests.

This commit is contained in:
Mechiel Lukkien
2025-03-03 23:59:43 +01:00
parent 2da280f2bb
commit 684c716e4d
7 changed files with 50 additions and 37 deletions

View File

@ -358,7 +358,7 @@ func (x XOps) MailboxesMarkRead(ctx context.Context, log mlog.Log, acc *store.Ac
// MessageMove moves messages to the mailbox represented by mailboxName, or to mailboxID if mailboxName is empty.
func (x XOps) MessageMove(ctx context.Context, log mlog.Log, acc *store.Account, messageIDs []int64, mailboxName string, mailboxID int64) {
acc.WithRLock(func() {
acc.WithWLock(func() {
var changes []store.Change
x.DBWrite(ctx, acc, func(tx *bstore.Tx) {