fix(qqbot): accept is_reconnect parameter in QQAdapter.connect() - #57652
Closed
Minervaowl7 wants to merge 1 commit into
Closed
Minervaowl7 wants to merge 1 commit into
Minervaowl7 wants to merge 1 commit into
Conversation
QQAdapter.connect() overrides BasePlatformAdapter.connect() but drops the `is_reconnect` keyword-only argument that the base class supports. When the gateway reconnects after a disconnect, it calls adapter.connect(is_reconnect=True), causing a TypeError. Fix by adding `*, is_reconnect: bool = False` to match the base class signature, consistent with other platform adapters (api_server, bluebubbles).
Contributor
Duplicate of #52966 (earliest still-open fix PR for #52914). Identical one-line fix adding the keyword-only |
Collaborator
|
Thanks for the focused QQBot reconnect fix. This is already implemented on current
Closing as implemented on main. |
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.
Description
QQAdapter.connect()overridesBasePlatformAdapter.connect()but drops theis_reconnectkeyword-only argument that the base class supports (and passes to every adapter on reconnection attempts).When the gateway disconnects and attempts to reconnect, it calls
adapter.connect(is_reconnect=True), which raises:The adapter never connects, and the gateway loops forever with 5-minute reconnect intervals.
Fix
Add
*, is_reconnect: bool = Falseto theconnect()signature, matching the base class pattern already used byapi_server.pyandbluebubbles.py.Testing
Confirmed on a live Hermes 0.18.0 gateway. Before the patch, the log shows 23 failed reconnect attempts with the TypeError. After the patch:
Closes #...