From 16048be2366889692bba16089f0246865fbb9c48 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Fri, 30 Sep 2022 16:55:10 +0100 Subject: [PATCH] Handle case when applying history visibility failed --- syncapi/streams/stream_pdu.go | 1 + 1 file changed, 1 insertion(+) diff --git a/syncapi/streams/stream_pdu.go b/syncapi/streams/stream_pdu.go index ba90706e8..92e1bccf0 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 {