mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-02-12 05:54:29 -06:00
Fix bugs
This commit is contained in:
parent
2ca972ef76
commit
f58ee67a7a
|
@ -157,18 +157,15 @@ func (r *Inputer) processRoomEventUsingUpdater(
|
|||
}
|
||||
commit, err := r.processRoomEvent(ctx, updater, inputRoomEvent)
|
||||
if commit {
|
||||
if err = updater.Commit(); err != nil {
|
||||
return false, fmt.Errorf("updater.Commit: %w", err)
|
||||
if cerr := updater.Commit(); err != nil {
|
||||
return true, fmt.Errorf("updater.Commit: %w", cerr)
|
||||
}
|
||||
} else {
|
||||
if rerr := updater.Rollback(); rerr != nil {
|
||||
return true, fmt.Errorf("updater.Rollback: %w", err)
|
||||
return true, fmt.Errorf("updater.Rollback: %w", rerr)
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
return true, err
|
||||
}
|
||||
return false, nil
|
||||
return false, err
|
||||
}
|
||||
|
||||
// InputRoomEvents implements api.RoomserverInternalAPI
|
||||
|
|
Loading…
Reference in a new issue