Fix session duplication and inflated playtime counting#9
Merged
Conversation
- Remove cacheSession() call from saveSession() to prevent zombie sessions that re-enter the cache after AFK/quit removal - Fix PlayerQuitListener to save and remove ALL sessions for a player - Fix PlayerAfkListener to handle ALL sessions when going AFK - Fix getPlaytimeByServer/getPlaytimeByCategory to deduplicate active sessions from DB results (flushed sessions were being counted twice) Agent-Logs-Url: https://github.com/SLNE-Development/surf-playtime/sessions/1031960a-c3e3-4e62-9082-79091c5c7214 Co-authored-by: TheBjoRedCraft <143264463+TheBjoRedCraft@users.noreply.github.com>
… AFK Agent-Logs-Url: https://github.com/SLNE-Development/surf-playtime/sessions/1031960a-c3e3-4e62-9082-79091c5c7214 Co-authored-by: TheBjoRedCraft <143264463+TheBjoRedCraft@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
TheBjoRedCraft
April 10, 2026 13:05
View session
TheBjoRedCraft
approved these changes
Apr 12, 2026
Contributor
|
@copilot bump version |
Agent-Logs-Url: https://github.com/SLNE-Development/surf-playtime/sessions/82a9e66c-38ad-485e-9ea1-da1ed8188e7f Co-authored-by: twisti-dev <76837088+twisti-dev@users.noreply.github.com>
auto-merge was automatically disabled
April 16, 2026 09:24
Head branch was pushed to by a user without write access
Contributor
Author
Bumped version to |
twisti-dev
approved these changes
Apr 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cacheSession()fromsaveSession()in PlaytimeServiceImplPlayerQuitListenerto handle ALL sessions for a playerPlayerAfkListener) to handle ALL sessions for a playergetPlaytimeByServer()andgetPlaytimeByCategory()deduplication