mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-03 21:24:35 +03:00
Fix conv.wait_event no longer raising Timeout
Should properly fix #1618.
This commit is contained in:
parent
ab9035acd2
commit
46ee8e86c6
|
@ -338,10 +338,10 @@ class Conversation(ChatGetter):
|
||||||
self._custom[counter] = (event, future)
|
self._custom[counter] = (event, future)
|
||||||
try:
|
try:
|
||||||
return await self._get_result(future, start_time, timeout, self._custom, counter)
|
return await self._get_result(future, start_time, timeout, self._custom, counter)
|
||||||
except asyncio.TimeoutError:
|
finally:
|
||||||
# Need to remove it from the dict if it times out, else we may
|
# Need to remove it from the dict if it times out, else we may
|
||||||
# try and fail to set the result later (#1618).
|
# try and fail to set the result later (#1618).
|
||||||
del self._custom[counter]
|
self._custom.pop(counter, None)
|
||||||
|
|
||||||
async def _check_custom(self, built):
|
async def _check_custom(self, built):
|
||||||
for key, (ev, fut) in list(self._custom.items()):
|
for key, (ev, fut) in list(self._custom.items()):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user