Skip to content

Commit

Permalink
Fix RuntimeError: Caught blocking call to sleep with args
Browse files Browse the repository at this point in the history
  • Loading branch information
cyr-ius committed Oct 5, 2024
1 parent ab54cba commit f3b5c1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions audiconnectpy/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from __future__ import annotations

import asyncio
from collections.abc import Callable
from datetime import datetime
import functools
Expand All @@ -10,7 +11,6 @@
import logging
import random
import re
import time
from typing import Any

from pydantic import SerializationInfo
Expand Down Expand Up @@ -96,7 +96,7 @@ async def newfn(*args: Any, **kwargs: Any) -> Any:
if logger is not None:
logger.warning("%s, trying again in %s seconds", error, _delay)

time.sleep(_delay)
await asyncio.sleep(_delay)
_delay *= backoff

if isinstance(jitter, tuple):
Expand Down

0 comments on commit f3b5c1b

Please sign in to comment.