fix(qqbot): accept is_reconnect kwarg in connect() to match base adapter interface - #53546
Closed
ulnit wants to merge 1 commit into
Closed
fix(qqbot): accept is_reconnect kwarg in connect() to match base adapter interface#53546ulnit wants to merge 1 commit into
ulnit wants to merge 1 commit into
Conversation
…ter interface gateway/run.py passes is_reconnect=True to adapter.connect() during reconnection, but QQAdapter.connect() did not accept this parameter, causing TypeError and an infinite crash-restart loop. All other platform adapters (signal, weixin, whatsapp_cloud, bluebubbles, yuanbao, api_server) already accept this parameter per the base class signature. This brings qqbot in line with the established interface. Fixes: QQ bot stuck in reconnect loop with error: QQAdapter.connect() got an unexpected keyword argument 'is_reconnect'
Collaborator
Duplicate of #52922 (earliest open canonical fix for #52914). Identical one-line |
tonydwb
approved these changes
Jun 27, 2026
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Adds is_reconnect keyword argument to QQAdapter.connect() to match the base adapter interface. Minimal one-line change.
Note
- Competing fix: PR #53540 by a different author implements the identical change. Either PR can be merged; the other should be closed.
Reviewed by Hermes Agent
This was referenced Jun 28, 2026
4 tasks
This was referenced Jul 6, 2026
Closed
Contributor
|
Thanks for the focused QQBot reconnect fix. This is an automated hermes-sweeper review; current
|
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
The QQ bot adapter's
connect()method does not accept theis_reconnectkeyword argument thatgateway/run.pypasses during reconnection:This causes an infinite crash-restart loop — the gateway catches the
TypeError, waits 60s, retries, crashes again.Root Cause
gateway/run.pyline 3132 calls:The base class (
base.py) defines:All other platform adapters already implement this signature:
signal.py✅weixin.py✅whatsapp_cloud.py✅bluebubbles.py✅yuanbao.py✅api_server.py✅qqbot/adapter.py❌ — missing the parameterFix
One-line change to match the base class interface:
Verification
tests/gateway/test_qqbot.pypass