Skip to content

Commit ca48275

Browse files
committed
remove extra sleep in ImpitHttpClient.stream
1 parent 9a8921e commit ca48275

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

src/crawlee/http_clients/_impit.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,6 @@ async def stream(
220220
try:
221221
yield _ImpitResponse(response)
222222
finally:
223-
# TODO: https://github.com/apify/impit/issues/242
224-
# Quickly closing Response while reading the response body causes an error in the Rust generator in `impit`.
225-
# With a short sleep and sync closing, the error does not occur.
226-
# Replace with `response.aclose` when this is resolved in impit.
227-
await asyncio.sleep(0.01)
228223
response.close()
229224

230225
def _get_client(self, proxy_url: str | None, cookie_jar: CookieJar | None) -> AsyncClient:

0 commit comments

Comments
 (0)