✨ feat: stream_measurements sends /app/streaming/stop on teardown #165
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/ws-stop"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The SPA explicitly stops the server-side stream session on teardown (
SEND destination:/app/streaming/stop, empty body —docs/energy.comwatt.com/websocket-realtime.md), instead of leaving it to die with the socket. The client now mirrors that in both stream paths (plain and reconnect): before the STOMPDISCONNECT, it best-effort SENDs/app/streaming/stop. Best-effort because the socket may already be dead (server-side drop): the failure is swallowed and theDISCONNECT/close()teardown still runs. Handshake failures keep the plain_close_wsteardown — the stream never started, so there is nothing to stop.Evidence
DISCONNECTframe; the server-side stream session was left running until the socket died.SEND\ndestination:/app/streaming/stop\n\n\x00) sent beforeDISCONNECTongen.close(), sent after natural stream end, silently swallowed on a dead socket, absent after a failed handshake, and sent in reconnect mode;pytest= 216 passed;mypyclean.Merge Danger
Door: two-way — teardown-only change; revert restores DISCONNECT-only.
Blast Radius: low — one extra STOMP frame per stream teardown; no success-path or frame-parsing change.
Closes #101 (stacked on #164 — merge that first, then retarget to main)
3b2f331477bf8b8cb903WIP: ✨ feat: stream_measurements sends /app/streaming/stop on teardownto ✨ feat: stream_measurements sends /app/streaming/stop on teardown