Additional fix to writers

This commit is contained in:
Neil Alexander 2020-08-27 10:33:48 +01:00
parent e5b9634f44
commit e3ac29768d
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -21,7 +21,6 @@ import (
"errors"
"fmt"
"github.com/matrix-org/dendrite/internal/sqlutil"
"github.com/matrix-org/gomatrixserverlib"
)
@ -33,7 +32,7 @@ func (d *Database) AssociateEDUWithDestination(
serverName gomatrixserverlib.ServerName,
receipt *Receipt,
) error {
return sqlutil.WithTransaction(d.DB, func(txn *sql.Tx) error {
return d.Writer.Do(d.DB, nil, func(txn *sql.Tx) error {
for _, nid := range receipt.nids {
if err := d.FederationSenderQueueEDUs.InsertQueueEDU(
ctx, // context