From fd53e0e7519f56c8842bc9a85828fc967dca1361 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Fri, 27 Mar 2026 15:35:48 +0800 Subject: [PATCH] fix(weixin_oc): add error handling and retry logic for inbound updates polling fixes: #7022 --- .../core/platform/sources/weixin_oc/weixin_oc_adapter.py | 7 +++++++ 1 file changed, 7 insertions(+) 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 c47b58087e..be0d9a9e51 100644 --- a/astrbot/core/platform/sources/weixin_oc/weixin_oc_adapter.py +++ b/astrbot/core/platform/sources/weixin_oc/weixin_oc_adapter.py @@ -902,6 +902,13 @@ async def run(self) -> None: "weixin_oc(%s): inbound long-poll timeout", self.meta().id, ) + except Exception as e: + logger.error( + "weixin_oc(%s): poll inbound updates failed, will retry after 5 seconds: %s", + self.meta().id, + e, + ) + await asyncio.sleep(5) except asyncio.CancelledError: raise except Exception as e: