Skip to content

fix(qq): respond to WebSocket Ping frames to prevent timeout#4041

Merged
theonlyhennygod merged 1 commit intozeroclaw-labs:masterfrom
jm-observer:fix/qq-websocket-ping-pong
Mar 20, 2026
Merged

fix(qq): respond to WebSocket Ping frames to prevent timeout#4041
theonlyhennygod merged 1 commit intozeroclaw-labs:masterfrom
jm-observer:fix/qq-websocket-ping-pong

Conversation

@jm-observer
Copy link
Copy Markdown

@jm-observer jm-observer commented Mar 20, 2026

Summary

  • Handle incoming Message::Ping frames in the QQ channel WebSocket loop by replying with Message::Pong
  • Prevents the server from dropping the connection due to unanswered Ping frames

Risk

Medium — behavioral change in src/channels/qq.rs, no security boundary impact.

Test plan

  • [*] Verify QQ bot maintains long-lived WebSocket connections without unexpected disconnects
  • [*] Confirm heartbeat mechanism still works correctly alongside Ping/Pong handling

🤖 Generated with Claude Code

The QQ channel WebSocket loop did not handle incoming Ping frames,
causing the server to consider the connection dead and drop it. Add a
Ping handler that replies with Pong, keeping the connection alive.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@theonlyhennygod theonlyhennygod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Correctly responds to WebSocket Ping frames with a Pong carrying the same payload, breaking on send failure.

@theonlyhennygod theonlyhennygod marked this pull request as ready for review March 20, 2026 22:22
@theonlyhennygod theonlyhennygod merged commit 9f5543e into zeroclaw-labs:master Mar 20, 2026
18 checks passed
@jm-observer jm-observer deleted the fix/qq-websocket-ping-pong branch March 21, 2026 10:23
webhive pushed a commit to webhive/zeroclaw that referenced this pull request Mar 24, 2026
…ut (zeroclaw-labs#4041)

The QQ channel WebSocket loop did not handle incoming Ping frames,
causing the server to consider the connection dead and drop it. Add a
Ping handler that replies with Pong, keeping the connection alive.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants