mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-02 19:20:09 +03:00
Fix timeout not occuring where expected
This commit is contained in:
parent
4e985c3e4a
commit
5731cf015e
|
@ -199,7 +199,9 @@ class UpdateMethods(UserMethods):
|
|||
rnd = lambda: random.randrange(-2**63, 2**63)
|
||||
while self.is_connected():
|
||||
try:
|
||||
concurrent.futures.wait([self.disconnected], timeout=60)
|
||||
next(concurrent.futures.as_completed(
|
||||
[self.disconnected], timeout=60))
|
||||
|
||||
continue # We actually just want to act upon timeout
|
||||
except concurrent.futures.TimeoutError:
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue
Block a user