mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-01-24 08:14:14 +03:00
Ignore requests invoked from ReadThread instead raising
Any unhandled exception on the ReadThread would cause it to stop, and handling the exception to the main thread on the next invoke or poll. Instead causing the thread to stop, simply ignore it.
This commit is contained in:
parent
80e9877256
commit
b04607e7ba
|
@ -246,7 +246,7 @@ class TelegramClient(TelegramBareClient):
|
|||
# This is only valid when the read thread is reconnecting,
|
||||
# that is, the connection lock is locked.
|
||||
if self._on_read_thread() and not self._connect_lock.locked():
|
||||
raise AssertionError('Cannot invoke requests from the ReadThread')
|
||||
return # Just ignore, we would be raising and crashing the thread
|
||||
|
||||
self.updates.check_error()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user