Allow passing sleep_threshold=0 to always raise flood waits

This commit is contained in:
Dan 2020-08-27 10:59:28 +02:00
parent eed3221ecb
commit 582e29dece

View File

@ -442,7 +442,7 @@ class Session:
except FloodWait as e:
amount = e.x
if amount > sleep_threshold > 0:
if amount > sleep_threshold >= 0:
raise
log.warning(f'[{self.client.session_name}] Sleeping for {amount}s (required by "{query}")')