diff options
Diffstat (limited to 'roomserver/input/latest_events.go')
-rw-r--r-- | roomserver/input/latest_events.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/roomserver/input/latest_events.go b/roomserver/input/latest_events.go index 7e03d544..f9fd1d5d 100644 --- a/roomserver/input/latest_events.go +++ b/roomserver/input/latest_events.go @@ -60,7 +60,12 @@ func updateLatestEvents( return } succeeded := false - defer common.EndTransaction(updater, &succeeded) + defer func() { + txerr := common.EndTransaction(updater, &succeeded) + if err == nil && txerr != nil { + err = txerr + } + }() u := latestEventsUpdater{ ctx: ctx, db: db, updater: updater, ow: ow, roomNID: roomNID, |