fix(qqbot): accept is_reconnect kwarg + zombie detection + heartbeat optimization - #59734
Open
jamesxia1988 wants to merge 1 commit into
Open
fix(qqbot): accept is_reconnect kwarg + zombie detection + heartbeat optimization#59734jamesxia1988 wants to merge 1 commit into
jamesxia1988 wants to merge 1 commit into
Conversation
Collaborator
Duplicate of #52966 -- the earliest still-open canonical fix for this QQBot |
…optimization - Add is_reconnect keyword arg to connect() to match base class signature (upstream 43b8ba4 added this to run.py but forgot to update qqbot adapter) - Add zombie connection detection: close WS if no server events for 5 min - Reduce heartbeat interval from 80% to 50% of server interval for more aggressive keepalive (QQ server has ~30min session timeout) - Update heartbeat ACK to mark alive so zombie detector doesn't fire on healthy-but-idle connections - Add Chinese error keywords (无权限/权限不足) to retryable error list fix(web_tools): fall through to httpx fallback for search-only backends - When configured backend is search-only (ddgs), fall through to active extract provider or httpx extraction instead of returning an error
jamesxia1988
force-pushed
the
fix/qqbot-connect-signature
branch
from
July 7, 2026 13:31
6ea7613 to
d06e8f0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Upstream commit 43b8ba4 added
is_reconnectkeyword argument to all platformconnect()calls ingateway/run.py, but the QQBot adapter was never updated to accept this parameter. This causesTypeError: QQAdapter.connect() got an unexpected keyword argument 'is_reconnect'on every reconnect attempt after a WebSocket drop.Additionally, QQBot connections are dropped every ~30 minutes by the server (code=4009 Session timed out) despite heartbeats. The upstream heartbeat interval (80% of server interval) is not aggressive enough.
Fix
is_reconnectkwarg inQQAdapter.connect()to match the base class signatureRelated