From b1770c5d756e1864d5eed9fa1a4a80ec4125231a Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Tue, 12 Jan 2021 14:47:47 +0000 Subject: [PATCH] Use ApplyUpdates in user stream to ensure we don't go backwards --- syncapi/notifier/userstream.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/syncapi/notifier/userstream.go b/syncapi/notifier/userstream.go index 720185d52..07be328e0 100644 --- a/syncapi/notifier/userstream.go +++ b/syncapi/notifier/userstream.go @@ -89,10 +89,9 @@ func (s *UserDeviceStream) Broadcast(pos types.StreamingToken) { s.lock.Lock() defer s.lock.Unlock() - s.pos = pos + s.pos.ApplyUpdates(pos) close(s.signalChannel) - s.signalChannel = make(chan struct{}) }