mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-26 08:13:09 -06:00
Don't advance position on remove again unless needed
This commit is contained in:
parent
0465f523cb
commit
fb90ca074e
4
eduserver/cache/cache.go
vendored
4
eduserver/cache/cache.go
vendored
|
|
@ -151,8 +151,6 @@ func (t *EDUCache) RemoveUser(userID, roomID string) int64 {
|
||||||
t.Lock()
|
t.Lock()
|
||||||
defer t.Unlock()
|
defer t.Unlock()
|
||||||
|
|
||||||
t.latestSyncPosition++
|
|
||||||
|
|
||||||
roomData, ok := t.data[roomID]
|
roomData, ok := t.data[roomID]
|
||||||
if !ok {
|
if !ok {
|
||||||
return t.latestSyncPosition
|
return t.latestSyncPosition
|
||||||
|
|
@ -163,6 +161,8 @@ func (t *EDUCache) RemoveUser(userID, roomID string) int64 {
|
||||||
return t.latestSyncPosition
|
return t.latestSyncPosition
|
||||||
}
|
}
|
||||||
|
|
||||||
|
t.latestSyncPosition++
|
||||||
|
|
||||||
timer.Stop()
|
timer.Stop()
|
||||||
delete(roomData.userSet, userID)
|
delete(roomData.userSet, userID)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue