diff --git a/src/asynchrony/various.py b/src/asynchrony/various.py index 95f9f7f..19e0c70 100644 --- a/src/asynchrony/various.py +++ b/src/asynchrony/various.py @@ -1,3 +1,4 @@ +import asyncio import time @@ -11,5 +12,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