aboutsummaryrefslogtreecommitdiff
path: root/syncapi
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2022-09-30 16:55:10 +0100
committerNeil Alexander <neilalexander@users.noreply.github.com>2022-09-30 16:55:10 +0100
commit16048be2366889692bba16089f0246865fbb9c48 (patch)
tree1a4937e0c1c2570db25630486b8da20a67c874af /syncapi
parent7d9545ceead42b4761ee9cce169bc8f5858521ed (diff)
Handle case when applying history visibility failed
Diffstat (limited to 'syncapi')
-rw-r--r--syncapi/streams/stream_pdu.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/syncapi/streams/stream_pdu.go b/syncapi/streams/stream_pdu.go
index ba90706e..92e1bccf 100644
--- a/syncapi/streams/stream_pdu.go
+++ b/syncapi/streams/stream_pdu.go
@@ -301,6 +301,7 @@ func (p *PDUStreamProvider) addRoomDeltaToResponse(
events, err := applyHistoryVisibilityFilter(ctx, snapshot, p.rsAPI, delta.RoomID, device.UserID, eventFilter.Limit, recentEvents)
if err != nil {
logrus.WithError(err).Error("unable to apply history visibility filter")
+ _ = snapshot.Rollback()
}
if len(delta.StateEvents) > 0 {