From 2031f3da741c367f7fd2034567453e9cdd69bed3 Mon Sep 17 00:00:00 2001 From: Rainor_da! <51012640+1zzxy1@users.noreply.github.com> Date: Wed, 25 Mar 2026 16:20:18 +0800 Subject: [PATCH] fix: keep weixin_oc polling after inbound timeouts (#6915) * fix: keep weixin_oc polling after inbound timeouts * Delete tests/test_weixin_oc_adapter.py --------- Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com> --- .../core/platform/sources/weixin_oc/weixin_oc_adapter.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/astrbot/core/platform/sources/weixin_oc/weixin_oc_adapter.py b/astrbot/core/platform/sources/weixin_oc/weixin_oc_adapter.py index b9caa0b09..c47b58087 100644 --- a/astrbot/core/platform/sources/weixin_oc/weixin_oc_adapter.py +++ b/astrbot/core/platform/sources/weixin_oc/weixin_oc_adapter.py @@ -895,7 +895,13 @@ class WeixinOCAdapter(Platform): await asyncio.sleep(self.qr_poll_interval) continue - await self._poll_inbound_updates() + try: + await self._poll_inbound_updates() + except asyncio.TimeoutError: + logger.debug( + "weixin_oc(%s): inbound long-poll timeout", + self.meta().id, + ) except asyncio.CancelledError: raise except Exception as e: