mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-01-24 08:14:14 +03:00
Fix invoke not raising ValueError when retries reach 0
This commit is contained in:
parent
8ecd2c2e06
commit
c1c6df9fd0
|
@ -410,8 +410,7 @@ class TelegramBareClient:
|
|||
if result:
|
||||
return result
|
||||
|
||||
if retries <= 0:
|
||||
raise ValueError('Number of retries reached 0.')
|
||||
raise ValueError('Number of retries reached 0.')
|
||||
finally:
|
||||
if sender != self._sender:
|
||||
sender.disconnect() # Close temporary connections
|
||||
|
|
Loading…
Reference in New Issue
Block a user