diff --git a/django_redis/client/herd.py b/django_redis/client/herd.py index 94d539cd..c5c6d7d8 100644 --- a/django_redis/client/herd.py +++ b/django_redis/client/herd.py @@ -26,9 +26,7 @@ def _is_expired(x, herd_timeout: int) -> bool: return True val = x + random.randint(1, herd_timeout) - if val >= herd_timeout: - return True - return False + return val >= herd_timeout class HerdClient(DefaultClient):