Dependencies:session-rs 0.1.3 → 0.2.0 (only the axum feature), plus axum 0.8. Tokio's features are now listed explicitly instead of coming in through other crates.
Transport: the WebSocket is served on / through axum with Session::from_axum, with a 1 MiB limit per message and per frame. Clients connect to the same URL and speak the same wire format, so released clients are unaffected.
Health:
GET /health runs SELECT 1 and returns 200 ok, or 503.
server healthcheck probes it and exits with 0 or 1.
The Dockerfile HEALTHCHECK runs every 30 s, so no curl is needed in the image. Coolify reports it as the container's health, and compose.yaml is unchanged.
Shutdown: SIGTERM or Ctrl+C now stops the server gracefully. Before, the process (running as PID 1) ignored SIGTERM, so every stop or redeploy waited for Docker's 10-second SIGKILL.
Refactor: the RPC handlers are unchanged, only moved into register_handlers.
session-rs 0.2 also fixes these for the server:
unbounded frame allocation from a single crafted frame header
lost responses from the send-before-register race
session_loop exiting on an accept error
missing replies for unknown methods
Testing
Run locally, with a Python websockets client:
/health returns 200. A plain GET / returns 400, since it isn't an upgrade.
server healthcheck exits 0 when the server is up and 1 when nothing is listening.
get_player, auth with a bad token, set_cloak, send_player and an unknown method all return correct responses.
A 2 MiB message closes only that connection, and later connections are served.
SIGTERM with a WebSocket open exits in 0.05 s, and the client sees the close.
Not tested: the Docker image build and the HEALTHCHECK inside a container, because Docker wasn't available on the dev machine.
## Summary
- **Dependencies:** `session-rs` 0.1.3 → 0.2.0 (only the `axum` feature), plus `axum` 0.8. Tokio's features are now listed explicitly instead of coming in through other crates.
- **Transport:** the WebSocket is served on `/` through axum with `Session::from_axum`, with a 1 MiB limit per message and per frame. Clients connect to the same URL and speak the same wire format, so released clients are unaffected.
- **Health:**
- `GET /health` runs `SELECT 1` and returns 200 `ok`, or 503.
- `server healthcheck` probes it and exits with 0 or 1.
- The Dockerfile `HEALTHCHECK` runs every 30 s, so no curl is needed in the image. Coolify reports it as the container's health, and `compose.yaml` is unchanged.
- **Shutdown:** SIGTERM or Ctrl+C now stops the server gracefully. Before, the process (running as PID 1) ignored SIGTERM, so every stop or redeploy waited for Docker's 10-second SIGKILL.
- **Refactor:** the RPC handlers are unchanged, only moved into `register_handlers`.
session-rs 0.2 also fixes these for the server:
- unbounded frame allocation from a single crafted frame header
- lost responses from the send-before-register race
- `session_loop` exiting on an accept error
- missing replies for unknown methods
## Testing
Run locally, with a Python `websockets` client:
- `/health` returns 200. A plain `GET /` returns 400, since it isn't an upgrade.
- `server healthcheck` exits 0 when the server is up and 1 when nothing is listening.
- `get_player`, `auth` with a bad token, `set_cloak`, `send_player` and an unknown method all return correct responses.
- A 2 MiB message closes only that connection, and later connections are served.
- SIGTERM with a WebSocket open exits in 0.05 s, and the client sees the close.
**Not tested:** the Docker image build and the `HEALTHCHECK` inside a container, because Docker wasn't available on the dev machine.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
- Serve the session WebSocket on `/` through axum
(`Session::from_axum`) with a 1 MiB message limit
- Add `/health` (checks the database) and a `server healthcheck`
subcommand used by the Dockerfile HEALTHCHECK
- Shut down on SIGTERM/Ctrl+C so container stops are immediate
- Move per-connection handler registration into `register_handlers`
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
session-rs0.1.3 → 0.2.0 (only theaxumfeature), plusaxum0.8. Tokio's features are now listed explicitly instead of coming in through other crates./through axum withSession::from_axum, with a 1 MiB limit per message and per frame. Clients connect to the same URL and speak the same wire format, so released clients are unaffected.GET /healthrunsSELECT 1and returns 200ok, or 503.server healthcheckprobes it and exits with 0 or 1.HEALTHCHECKruns every 30 s, so no curl is needed in the image. Coolify reports it as the container's health, andcompose.yamlis unchanged.register_handlers.session-rs 0.2 also fixes these for the server:
session_loopexiting on an accept errorTesting
Run locally, with a Python
websocketsclient:/healthreturns 200. A plainGET /returns 400, since it isn't an upgrade.server healthcheckexits 0 when the server is up and 1 when nothing is listening.get_player,authwith a bad token,set_cloak,send_playerand an unknown method all return correct responses.Not tested: the Docker image build and the
HEALTHCHECKinside a container, because Docker wasn't available on the dev machine.🤖 Generated with Claude Code