Change8
Error1 reports

Fix BrokenResourceError

in httpx

Solution

BrokenResourceError in httpx often stems from unclosed resources like sockets after a timeout or disconnection during asynchronous operations. To fix this, ensure all httpx resources are properly closed within `async with` blocks or by explicitly calling `await client.aclose()` to release resources, especially when handling exceptions or timeouts. This prevents resource exhaustion and related errors by guaranteeing cleanup.

Timeline

First reported:Dec 15, 2025
Last reported:Dec 15, 2025

Need More Help?

View the full changelog and migration guides for httpx

View httpx Changelog