Skip to content

Commit 2031f3d

Browse files
1zzxy1Soulter
andauthored
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>
1 parent 5e63635 commit 2031f3d

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

astrbot/core/platform/sources/weixin_oc/weixin_oc_adapter.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,13 @@ async def run(self) -> None:
895895
await asyncio.sleep(self.qr_poll_interval)
896896
continue
897897

898-
await self._poll_inbound_updates()
898+
try:
899+
await self._poll_inbound_updates()
900+
except asyncio.TimeoutError:
901+
logger.debug(
902+
"weixin_oc(%s): inbound long-poll timeout",
903+
self.meta().id,
904+
)
899905
except asyncio.CancelledError:
900906
raise
901907
except Exception as e:

0 commit comments

Comments
 (0)