From ca48275e3ab2e8e370a3a3d79d6c566c924c8dd2 Mon Sep 17 00:00:00 2001 From: Max Bohomolov Date: Thu, 18 Jun 2026 21:18:44 +0000 Subject: [PATCH] remove extra sleep in `ImpitHttpClient.stream` --- src/crawlee/http_clients/_impit.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/crawlee/http_clients/_impit.py b/src/crawlee/http_clients/_impit.py index 708a5c363e..11e8c81ada 100644 --- a/src/crawlee/http_clients/_impit.py +++ b/src/crawlee/http_clients/_impit.py @@ -220,11 +220,6 @@ async def stream( try: yield _ImpitResponse(response) finally: - # TODO: https://github.com/apify/impit/issues/242 - # Quickly closing Response while reading the response body causes an error in the Rust generator in `impit`. - # With a short sleep and sync closing, the error does not occur. - # Replace with `response.aclose` when this is resolved in impit. - await asyncio.sleep(0.01) response.close() def _get_client(self, proxy_url: str | None, cookie_jar: CookieJar | None) -> AsyncClient: