diff --git a/s3fs/core.py b/s3fs/core.py index 7e7664f3..d6eb4e45 100644 --- a/s3fs/core.py +++ b/s3fs/core.py @@ -118,13 +118,13 @@ async def _error_wrapper(func, *, args=(), kwargs=None, retries): except ClientError as e: logger.debug("Client error (maybe retryable): %s", e) err = e - wait_time = asyncio.sleep(min(1.7**i * 0.1, 15)) + wait_time = min(1.7**i * 0.1, 15) if "SlowDown" in str(e): - await wait_time + await asyncio.sleep(wait_time) elif "reduce your request rate" in str(e): - await wait_time + await asyncio.sleep(wait_time) elif "XAmzContentSHA256Mismatch" in str(e): - await wait_time + await asyncio.sleep(wait_time) else: break except Exception as e: