From 96f5e1753a725f6ccf6a7aa3bfebaed8753f117e Mon Sep 17 00:00:00 2001 From: danbao Date: Sun, 28 Jun 2026 15:12:34 +0800 Subject: [PATCH] fix(qqbot): accept is_reconnect kwarg in connect() to fix reconnection loop The gateway reconnection watcher calls adapter.connect(is_reconnect=True) on failed platforms, but QQAdapter.connect() did not accept this parameter, causing every reconnect attempt to fail with: QQAdapter.connect() got an unexpected keyword argument 'is_reconnect' All other platform adapters (weixin, signal, api_server, bluebubbles, webhook, whatsapp_cloud, yuanbao, msgraph_webhook) already accept is_reconnect. This one-line fix brings QQBot in line with the BasePlatformAdapter.connect() contract. --- gateway/platforms/qqbot/adapter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gateway/platforms/qqbot/adapter.py b/gateway/platforms/qqbot/adapter.py index 9532662131df..8215b30378ce 100644 --- a/gateway/platforms/qqbot/adapter.py +++ b/gateway/platforms/qqbot/adapter.py @@ -278,7 +278,7 @@ def enforces_own_access_policy(self) -> bool: # Connection lifecycle # ------------------------------------------------------------------ - async def connect(self) -> bool: + async def connect(self, *, is_reconnect: bool = False) -> bool: """Authenticate, obtain gateway URL, and open the WebSocket.""" if not AIOHTTP_AVAILABLE: message = "QQ startup failed: aiohttp not installed"