mirror of
https://github.com/zyycn/codex-proxy-rs.git
synced 2026-11-23 16:00:40 +00:00
Send a downstream Ping every 25 seconds while responses are pending or the connection is idle. Match the official Codex client's Pong handling without adding a Pong deadline or extending business request timeouts. Skip missed ticks and keep heartbeat writes bounded and cancellable. Record Ping/Pong counts and read/write idle durations in disconnect logs. Serialize correlation IDs as borrowed strings so gateway-api checks do not require the serde/rc feature. Cover silent active responses, delayed ticks, missing Pongs, blocked writes and lifecycle cancellation. Adapt connection expiry coverage for heartbeats. Validation: gateway-api WebSocket tests (38 passed), workspace rustfmt, and strict gateway-api Clippy with all targets and features, without serde/rc. Co-authored-by: Codex <noreply@openai.com>