mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-31 10:43:10 -06:00
Fix logic oops when deciding whether to use a transaction in storeEvent
This commit is contained in:
parent
31b2d1f37c
commit
c3e85313eb
|
|
@ -553,7 +553,7 @@ func (d *Database) storeEvent(
|
||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
var txn *sql.Tx
|
var txn *sql.Tx
|
||||||
if updater == nil || updater.txn != nil {
|
if updater != nil && updater.txn != nil {
|
||||||
txn = updater.txn
|
txn = updater.txn
|
||||||
}
|
}
|
||||||
err = d.Writer.Do(d.DB, txn, func(txn *sql.Tx) error {
|
err = d.Writer.Do(d.DB, txn, func(txn *sql.Tx) error {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue