File: src/entrabot/tools/rate_limit.py
Location: handle_async_request (L62-L107)
Category: leak
Priority: low
Description
On each retry the loop reassigns response without aclose() / aread() on the prior one. httpx returns the underlying connection to the pool only after the response is consumed or GC'd; under sustained 429 or 5xx traffic this can cause pool starvation.
Suggested fix
await response.aread() (or aclose()) immediately before issuing the retry request.
Filed automatically by a thorough code-review pass over src/entrabot/ on 2026-06-13. Internal review id: #58.
File:
src/entrabot/tools/rate_limit.pyLocation: handle_async_request (L62-L107)
Category: leak
Priority: low
Description
On each retry the loop reassigns response without aclose() / aread() on the prior one. httpx returns the underlying connection to the pool only after the response is consumed or GC'd; under sustained 429 or 5xx traffic this can cause pool starvation.
Suggested fix
await response.aread() (or aclose()) immediately before issuing the retry request.
Filed automatically by a thorough code-review pass over
src/entrabot/on 2026-06-13. Internal review id: #58.