Skip to content

fix: avoid cross-loop session reuse in Weixin direct sends#14384

Open
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/weixin-cross-loop-send-file-13305
Open

fix: avoid cross-loop session reuse in Weixin direct sends#14384
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/weixin-cross-loop-send-file-13305

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

Summary

  • only reuse the live Weixin adapter when its send session belongs to the current event loop
  • fall back to a fresh one-shot aiohttp session for cross-loop media sends
  • add regression coverage for same-loop reuse and cross-loop fallback

Testing

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

Closes #13305.

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery platform/wecom WeCom / WeChat Work adapter labels Apr 23, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Competing fix with #13350, #13520, #12810 — all address same cross-loop Weixin session reuse bug. Maintainers should pick one.

@alt-glitch

Copy link
Copy Markdown
Collaborator

Competing fix with #13350, #13520, #12810.

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 P2 Medium — degraded but workaround exists 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]: weixin send file failed

2 participants