mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-26 00:03:09 -06:00
Use ApplyUpdates in user stream to ensure we don't go backwards
This commit is contained in:
parent
ec1b017906
commit
b1770c5d75
|
|
@ -89,10 +89,9 @@ func (s *UserDeviceStream) Broadcast(pos types.StreamingToken) {
|
||||||
s.lock.Lock()
|
s.lock.Lock()
|
||||||
defer s.lock.Unlock()
|
defer s.lock.Unlock()
|
||||||
|
|
||||||
s.pos = pos
|
s.pos.ApplyUpdates(pos)
|
||||||
|
|
||||||
close(s.signalChannel)
|
close(s.signalChannel)
|
||||||
|
|
||||||
s.signalChannel = make(chan struct{})
|
s.signalChannel = make(chan struct{})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue