Repository navigation
fix(logout): report connection loss after a refused logout - #515
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
otclient-web | 56e98c4 | Commit Preview URL Branch Preview URL |
Nov 29 2026, 10:07 AM |
The logout flag was only cleared on session teardown, so if the server refused the logout (no-logout tile, fight, or an onLogout script) a later unrelated socket loss was treated as deliberate and the TV's connection-loss notice was suppressed. Scope the intent to the logout exchange: Jamera's Protocol76::logout either closes the connection in the same dispatcher task or refuses and keeps the session alive (script refusals may send nothing). Any inbound frame received more than one round trip after the request was therefore sent after a refusal, so the intent lapses on the first frame after a 5 s grace window (Jamera pings idle players every 5 s). PacketDispatcher's nextFrame now supports several concurrent waiters so this does not displace the TV resume probe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LSWCoMs13M8tAk61rMV9q3
santi1584
force-pushed
the
fix/refused-logout-493
branch
from
November 29, 2026 10:06
65d617b to
56e98c4
Compare
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 #493.
Before this change,
requestedLogoutstayed set until the session ended. If Jamera refused a logout (no-logout tile, fight, or anonLogoutscript, which may refuse silently), a later unrelated connection loss looked deliberate, and the TV did not show its connection-lost notice.How it works
logoutIntent(src/lib/jamera/logoutIntent.ts) replaces the boolean. The intent ends on the first inbound frame that arrives at least 5 s after the request.Protocol76::logoutcloses the connection in the same task when it succeeds, so the server sends nothing after a successful logout.PacketDispatcher.nextFramenow accepts several one-shot listeners, so the logout watch and the TV resume probe don't evict each other. Behaviour is unchanged for the single existing caller, which always cancels.Known edges
Tests: five unit tests in
src/__tests__/logoutIntent.test.ts. Lint, build, proxy typecheck and 1,050 unit tests pass locally. CI runs the browser and Chromium 79 checks.From the #505 quick-win queue.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LSWCoMs13M8tAk61rMV9q3