Skip to content

Commit

Permalink
Correctly remove rank cache entries on account delete. (#1272)
Browse files Browse the repository at this point in the history
Ranks cache entries for leaderboards with no expiry are now correctly
removed on account delete.
  • Loading branch information
sesposito authored Oct 7, 2024
1 parent 0c94f92 commit 6cbe036
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr

### Fixed
- Ensure matchmaker stats behave correctly if matchmaker becomes fully empty and idle.
- Correctly clear rank cache entries on account deletion.

## [3.23.0] - 2024-07-27
### Added
Expand Down
2 changes: 1 addition & 1 deletion server/core_leaderboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ func LeaderboardRecordsDeleteAll(ctx context.Context, logger *zap.Logger, leader
}

expiryUnix := expiryTime.Time.Unix()
if expiryUnix <= currentTime {
if expiryUnix != 0 && expiryUnix <= currentTime {
// Expired ranks are handled by the rank cache itself.
continue
}
Expand Down

0 comments on commit 6cbe036

Please sign in to comment.