diff --git a/pyrogram/session/session.py b/pyrogram/session/session.py index ca6ff0622..20af67192 100644 --- a/pyrogram/session/session.py +++ b/pyrogram/session/session.py @@ -423,7 +423,7 @@ async def invoke( except (FloodWait, FloodPremiumWait) as e: amount = e.value - if amount > sleep_threshold >= 0: + if sleep_threshold < 0 or amount > sleep_threshold: raise log.warning('[%s] Waiting for %s seconds before continuing (required by "%s")',