From bfed962a139c31fbf914f88813d8a4e40126fb0b Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Tue, 15 Dec 2020 14:21:39 +0000 Subject: [PATCH] Fix lint error --- syncapi/internal/keychange.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/syncapi/internal/keychange.go b/syncapi/internal/keychange.go index fb1749377..cf9cb1f07 100644 --- a/syncapi/internal/keychange.go +++ b/syncapi/internal/keychange.go @@ -73,8 +73,10 @@ func DeviceListCatchup( offset = sarama.OffsetOldest // Extract partition/offset from sync token // TODO: In a world where keyserver is sharded there will be multiple partitions and hence multiple QueryKeyChanges to make. - partition = from.DeviceListPosition.Partition - offset = from.DeviceListPosition.Offset + if !from.DeviceListPosition.IsEmpty() { + partition = from.DeviceListPosition.Partition + offset = from.DeviceListPosition.Offset + } var toOffset int64 toOffset = sarama.OffsetNewest if toLog := to.DeviceListPosition; toLog.Offset > 0 {