Skip to content

fix(weixin): avoid cross-loop live session reuse#13520

Open
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/weixin-live-session-loop-13099
Open

fix(weixin): avoid cross-loop live session reuse#13520
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/weixin-live-session-loop-13099

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

Summary

  • only reuse the live Weixin adapter when its aiohttp send session belongs to the current event loop
  • fall back to a temporary session for sync bridges like send_message and cron delivery
  • add a regression test that covers the foreign-loop live adapter path

Closes #13099

Testing

  • pytest -o addopts='' tests/gateway/test_weixin.py

@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery platform/wecom WeCom / WeChat Work adapter labels Apr 22, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Related to #13350 and #12810 (same cross-loop reuse fix for Weixin). May supersede both — verify which should be merged.

1 similar comment
@alt-glitch

Copy link
Copy Markdown
Collaborator

Related to #13350 and #12810 (same cross-loop reuse fix for Weixin). May supersede both — verify which should be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery platform/wecom WeCom / WeChat Work adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: WeChat send_message causes "Timeout context manager should be used inside a task" error

2 participants