Repository navigation
feat(console): ping version 1 sockets and close them at session expiry - #1185
Merged
Merged
Conversation
6 of 7 tasks
A proxy in front of the server closes a socket that stays silent, so a version 1 connection now gets a WebSocket ping every 20 seconds. A ping that cannot be written drops the connection of a client that is gone. A connection that authenticated with a browser session is closed with 1008 and the error code unauthorized when that session reaches its expiry time, instead of staying open until its next command. The web server does not hand pongs to the handler, so the 60 second pong deadline is not part of this change. Signed-off-by: TheMeinerLP <github@themeinerlp.dev>
TheMeinerLP
force-pushed
the
feat/console-liveness
branch
from
November 23, 2026 03:53
6ec54bd to
4046148
Compare
Test results 750 files 750 suites 9m 32s ⏱️ Results for commit 4046148. |
This was referenced Nov 23, 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.
Description
An open console in a browser could outlive the login that opened it, and a console left idle behind a proxy was cut off without a word. This change gives every version 1 socket a ping every 20 seconds, so a proxy never sees it silent, and closes a socket that was opened with a browser session at the moment that session ends (1008,
unauthorized). A client that is gone is dropped when a ping cannot be written. Legacy sockets are untouched.Stacked on #1181 (the base is its branch); it changes the same connection seam. Part of the task 4.7 of
add-console-cli: this covers the pings and the close at expiry. The 60 second pong deadline is not here: Javalin does not hand pongs to a handler, so the server cannot yet tell a silent client from an answering one. That needs a decision from the maintainer.Type of change
feat- new featureHow was this tested?
ConsoleWebSocketLivenessTest(5 cases on the fake scheduler, no waits): ping every 20 seconds, a failed ping drops the connection, no ping after release, session expiry closes with 1008, a token connection has no expiry.heavy ./gradlew --no-daemon --max-workers=2 :reposilite-backend:test --tests 'com.reposilite.console.*'passes.Checklist
CLAUDE.md./gradlew buildpasses locally (the console tests ran; CI runs the full build)