You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Kraken spot WebSocket idle timeout to detect dead connections (#4275)
`KrakenSpotWebSocketClient::connect` hardcoded `idle_timeout_ms: None`, so a
connection that acknowledges a subscription but never attaches the data
fan-out (socket stays open, no close frame, no transport error) was
undetectable: the strategy received no data indefinitely with no reconnect.
Add `ws_idle_timeout_ms` to `KrakenDataClientConfig` (default 10s) and wire it
into the spot v2 WS config. The read loop resets its idle timer on Kraken
application frames (text/binary), and Kraken sends a `heartbeat` text frame
once per second while any subscription is active, so a live subscribed
connection stays well within the window while a silent one trips it and runs
the existing reconnect + resubscribe path. `0` disables the timeout.
The default is kept short enough to rely on the 1/s heartbeats rather than the
~30s keepalive pong, which assumes the connection carries a subscription; this
is documented on the field. The authenticated execution WS opts out (`0`) to
preserve its current behavior, since this issue concerns the public data WS.
Fixes#4255.
Coded by an LLM.
0 commit comments