mirror of
https://github.com/rommapp/romm.git
synced 2026-06-28 06:46:00 +00:00
The async backend's `loop.getaddrinfo` ran without any timeout, so a slow or hanging resolver could outlive the timeout the caller passed — the previous code only bounded the TCP connect inside the inner backend. Wrap the resolution in `asyncio.timeout(timeout)` and surface the timeout as `httpcore.ConnectTimeout`. Also tidy the test stubs (mypy func-returns-value) and add explicit type annotations to the `calls` lists (mypy var-annotated). A targeted `# noqa: ASYNC109` sits on the `timeout` parameter of `connect_tcp` / `connect_unix_socket` with an explanatory comment: the rule advises against `timeout` parameters on async APIs we author, but here we're implementing `AsyncNetworkBackend`, and the timeout is consumed in the asyncio-native pattern the rule endorses. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>