mirror of
https://github.com/mjl-/mox.git
synced 2025-07-14 02:14:36 +03:00
bugfix: missing account close in queue direct send
found while writing new tests for upcoming functionality. the test had an embarrassing workaround for the symptoms...
This commit is contained in:
@ -728,6 +728,10 @@ func updateRecipientDomainTLS(ctx context.Context, log mlog.Log, senderAccount s
|
||||
if err != nil {
|
||||
return fmt.Errorf("open account: %w", err)
|
||||
}
|
||||
defer func() {
|
||||
err := acc.Close()
|
||||
log.Check(err, "closing account")
|
||||
}()
|
||||
err = acc.DB.Write(ctx, func(tx *bstore.Tx) error {
|
||||
// First delete any existing record.
|
||||
if err := tx.Delete(&store.RecipientDomainTLS{Domain: rdt.Domain}); err != nil && err != bstore.ErrAbsent {
|
||||
|
Reference in New Issue
Block a user