aboutsummaryrefslogtreecommitdiff
path: root/syncapi/streams/stream_devicelist.go
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2022-09-30 17:07:37 +0100
committerNeil Alexander <neilalexander@users.noreply.github.com>2022-09-30 17:07:37 +0100
commit0116db79c601d752cc097fc13fe7d22bdb01faae (patch)
treea2ebef5453e390311dc61a3b143ab82d64a4f35e /syncapi/streams/stream_devicelist.go
parent16048be2366889692bba16089f0246865fbb9c48 (diff)
Reset transaction after a failure
Diffstat (limited to 'syncapi/streams/stream_devicelist.go')
-rw-r--r--syncapi/streams/stream_devicelist.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/syncapi/streams/stream_devicelist.go b/syncapi/streams/stream_devicelist.go
index 10ede573..307099b8 100644
--- a/syncapi/streams/stream_devicelist.go
+++ b/syncapi/streams/stream_devicelist.go
@@ -34,13 +34,13 @@ func (p *DeviceListStreamProvider) IncrementalSync(
to, _, err = internal.DeviceListCatchup(context.Background(), snapshot, p.keyAPI, p.rsAPI, req.Device.UserID, req.Response, from, to)
if err != nil {
req.Log.WithError(err).Error("internal.DeviceListCatchup failed")
- _ = snapshot.Rollback()
+ _ = snapshot.Reset()
return from
}
err = internal.DeviceOTKCounts(req.Context, p.keyAPI, req.Device.UserID, req.Device.ID, req.Response)
if err != nil {
req.Log.WithError(err).Error("internal.DeviceListCatchup failed")
- _ = snapshot.Rollback()
+ _ = snapshot.Reset()
return from
}