Skip to content

internal: fix aiohttp ClientSession closed after first request (fork CI only) - #10

Closed
songzhendong wants to merge 2 commits into
masterfrom
fix/http-reporter-session-silent-drop
Closed

songzhendong wants to merge 2 commits into
masterfrom
fix/http-reporter-session-silent-drop

Conversation

@songzhendong

@songzhendong songzhendong commented Sep 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

Internal fork CI only — not for apache/skywalking-python.

Fix only: async with self.client permanently closed the long-lived aiohttp ClientSession after the first HTTP request when SW_AGENT_ASYNCIO_ENHANCEMENT=true and protocol=http.

  • Use async with self.client.post(...) (closes response, not session)
  • Add aclose() on async HTTP clients / protocol

Test plan

  • tests/unit/test_http_reporter.py (session reuse)
  • Fork CI green

@songzhendong
songzhendong force-pushed the fix/http-reporter-session-silent-drop branch 2 times, most recently from 0845fd6 to 4f2b38e Compare September 19, 2026 12:54
Replace async-with on the shared ClientSession (closes it after the first
request) with async-with on the response. Add aclose() for session cleanup.
@songzhendong
songzhendong force-pushed the fix/http-reporter-session-silent-drop branch from 4f2b38e to 0cd9b15 Compare September 19, 2026 13:02
@songzhendong songzhendong changed the title internal: fix HTTP reporter session close + silent drop (fork CI only) internal: fix aiohttp ClientSession closed after first request (fork CI only) Sep 19, 2026
@songzhendong

Copy link
Copy Markdown
Owner Author

Superseded: already on fork master via upstream apache#422 (5666826). Closing this fork PR as unused.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants