New
- Idle timeouts are now explicit: use idle-timeout= (or idle=) on
@websocket. The timer resets on any send or receive, so heartbeats/pings keep the socket open. - We no longer kill sessions just because the server stays quiet while you’re still sending. The idle watchdog only fires when there’s no activity at all.
- Timeout closures now include “idle timeout after …” in metadata/history so you can see why a session ended.
- Docs/UI/examples updated.
Breaking change
- If you relied on a "receive-only" timeout that closed the socket even while you were sending, that behavior is gone - timeouts now mean "idle” by design. If you relied on the old "receive-only" timeout (closed when no inbound frames even if you were still sending), here’s how to get that behavior back:
- Prefer server-side timeouts if your API supports them, or
- Make it explicit in your script: after your last send, insert a wait and then close yourself if nothing arrived. Example:
# @websocket idle-timeout=0 # disable idle watchdog
# @ws send {"op":"ping"}
# @ws wait 10s # give the server time to answer
# @ws close 1000 "no server reply within 10s"
# @script test
> if (stream.summary.receivedCount === 0) throw "server stayed silent";
And as always - small improvements here and there.