Gateway restart notices: explicit status{restarting} signal, correct timing
The app previously showed 'Gateway restarting' on every connection loss.
Now the gateway broadcasts status{state=restarting} on its shutdown path
(before closing the sockets), and the app:
- posts 'Gateway restarting' immediately on that frame (not on the
socket-drop transition, which lags by the ~20s WS ping timeout)
- posts 'Gateway online' on the next reconnect only when the restart
notice was posted (latch) - a plain network drop shows neither, just
the reconnect banner
- drops the 'Gateway is restarting...' banner (replaced by the chat notice)
Docs (04-wire-protocol, frames.schema.json) updated: restarting is no
longer reserved. Test for the disconnect broadcast added to the local
hermes-agent test mirror (git-ignored, not committed).
This commit is contained in:
1 parent
3a33f6be15
commit
6591d7cec0
6 files changed
+79
-33
No files matched your search
@@ -280,7 +280,13 @@ messages only.
|
||||
### `status`
|
||||
|
||||
Gateway health state. Broadcast to all connected clients at startup
|
||||
(`state: "online"`); `restarting` / `degraded` are reserved for future use.
|
||||
(`state: "online"`) and to late joiners on `hello.ack`. The gateway also
|
||||
broadcasts `state: "restarting"` on its shutdown path (restart/stop), right
|
||||
before closing the sockets — the app posts the "Gateway restarting" chat
|
||||
notice immediately on that frame (the socket can take up to the ~20 s ping
|
||||
timeout to actually drop, so the notice must not wait for the disconnect);
|
||||
a plain network drop shows just the reconnect banner. `degraded` is reserved
|
||||
for future use.
|
||||
|
||||
```json
|
||||
{"type":"status","payload":{"state":"online"}}
|
||||
|
||||
Reference in new issue
Block a user