mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-26 00:03: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()
|
||||
defer t.Unlock()
|
||||
|
||||
t.latestSyncPosition++
|
||||
|
||||
roomData, ok := t.data[roomID]
|
||||
if !ok {
|
||||
return t.latestSyncPosition
|
||||
|
|
@ -163,6 +161,8 @@ func (t *EDUCache) RemoveUser(userID, roomID string) int64 {
|
|||
return t.latestSyncPosition
|
||||
}
|
||||
|
||||
t.latestSyncPosition++
|
||||
|
||||
timer.Stop()
|
||||
delete(roomData.userSet, userID)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue