diff --git a/replicate/client.py b/replicate/client.py index f7e0b645..5f1e4394 100644 --- a/replicate/client.py +++ b/replicate/client.py @@ -305,7 +305,7 @@ async def handle_async_request(self, request: httpx.Request) -> httpx.Response: ): return response - response.close() + await response.aclose() sleep_for = self._calculate_sleep(attempts_made, response.headers) await asyncio.sleep(sleep_for)