mirror of
https://github.com/matrix-org/dendrite.git
synced 2024-11-22 06:11:55 -06:00
Fix a bug where we would accidentally skip over some events
This commit is contained in:
parent
a7953fe3ff
commit
fb5e1abe71
|
@ -400,6 +400,9 @@ func (rp *RequestPool) OnIncomingSyncRequest(req *http.Request, device *userapi.
|
|||
reasonablePositions := findReasonableIncrementalSyncWindow(
|
||||
syncReq.Since, rp.Notifier.CurrentPosition(),
|
||||
)
|
||||
// Also update the currentPos, which is used for the retry logic below.
|
||||
// Otherwise we may skip over some events.
|
||||
currentPos = reasonablePositions
|
||||
syncReq.Response.NextBatch = types.StreamingToken{
|
||||
PDUPosition: withTransaction(
|
||||
syncReq.Since.PDUPosition,
|
||||
|
|
Loading…
Reference in a new issue