net: sync serverInfo version with web version and reconnect on first missed heartbeat

This commit is contained in:
Jage9
2026-02-22 18:24:53 -05:00
parent c7c30f234d
commit 0cfba9f1a7
5 changed files with 34 additions and 8 deletions

View File

@@ -61,6 +61,6 @@ This is a behavior guide for packet semantics beyond raw schemas.
- Client sends automatic heartbeat `ping` packets every 10 seconds while connected.
- Heartbeat pings use negative `clientSentAt` ids and are internal (not user-visible ping status).
- If no heartbeat `pong` arrives within 25 seconds, client force-disconnects and reconnects.
- If a heartbeat `pong` is missed for one interval (10 seconds), client force-disconnects and reconnects.
- After reconnect, if `welcome.serverInfo.instanceId` changed, client announces:
`Server restarted, version <version>.`

View File

@@ -47,7 +47,7 @@ Core incoming message effects:
## Stale Connection Recovery
- While running, client sends heartbeat `ping` every 10 seconds.
- If no heartbeat `pong` is observed for 25 seconds, client auto-reconnects.
- If one heartbeat `pong` is missed (10-second interval), client auto-reconnects.
- If reconnect lands on a different `welcome.serverInfo.instanceId`, client announces server restart/version.
## Disconnect/Cleanup