From 777b83169179336ae25381631fcdfa9f868f1fb2 Mon Sep 17 00:00:00 2001 From: Soulter <37870767+Soulter@users.noreply.github.com> Date: Fri, 27 Mar 2026 15:36:31 +0800 Subject: [PATCH] fix(weixin_oc): add error handling and retry logic for inbound updates polling (#7041) 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 c47b58087..be0d9a9e5 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 @@ class WeixinOCAdapter(Platform): "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: