Fix: player session never recovers when server resets - #18
Open
karyao wants to merge 6 commits into
Open
Conversation
karyao
marked this pull request as draft
August 19, 2026 01:43
… connecting fails 3 times
karyao
force-pushed
the
fix-12-player-session-never-recovers-after-server-restart
branch
from
August 19, 2026 07:38
2c598a9 to
7a8c616
Compare
karyao
force-pushed
the
fix-12-player-session-never-recovers-after-server-restart
branch
from
August 19, 2026 09:22
a149dc3 to
f72fbea
Compare
karyao
marked this pull request as ready for review
August 19, 2026 09:27
Contributor
Author
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.

Closes #12
Description:
When game restarts, player session cookies get invalidated so websocket can never reconnect so the player is always stuck on "Reconnecting..." forever. This change allows users to automatically re-register the player with a fresh session.
After 3 consecutie failed ocnnection attemptions, the client stops retrying and automatically re-registers the player with a fresh session with the saved player's name.
If the server is down, it'll lead the user back to the registration page.