net: sync serverInfo version with web version and reconnect on first missed heartbeat
This commit is contained in:
@@ -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>.`
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user