diff --git a/src/asynchrony/various.py b/src/asynchrony/various.py index 95f9f7f..399d348 100644 --- a/src/asynchrony/various.py +++ b/src/asynchrony/various.py @@ -1,4 +1,4 @@ -import time +import asyncio async def retry_with_backoff(func, max_retries=3): @@ -11,5 +11,5 @@ async def retry_with_backoff(func, max_retries=3): except Exception as e: last_exception = e if attempt < max_retries - 1: - time.sleep(0.0001 * attempt) + await asyncio.sleep(0.0001 * attempt) raise last_exception