Description
Currently the WebSocket client uses a fixed heartbeat interval.
When an order-builder is dropped or the connection experiences temporary lag, heartbeats can stop (see related #91) and the client never recovers until a full reconnect.
Proposed change
- Expose a
heartbeat_interval (and optional missed_pong_threshold) in the WsConfig / client builder.
- Automatically restart the heartbeat timer after a successful reconnect or after an order-builder is re-attached.
- Emit a clear diagnostic event when heartbeats are restarted so consumers can observe the recovery.
Why
Makes the client more resilient under the same conditions that already cause issues #91, #88 and #86, while remaining fully backward-compatible (default values stay the same).
Checklist
Description
Currently the WebSocket client uses a fixed heartbeat interval.
When an order-builder is dropped or the connection experiences temporary lag, heartbeats can stop (see related #91) and the client never recovers until a full reconnect.
Proposed change
heartbeat_interval(and optionalmissed_pong_threshold) in theWsConfig/ client builder.Why
Makes the client more resilient under the same conditions that already cause issues #91, #88 and #86, while remaining fully backward-compatible (default values stay the same).
Checklist