mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 05:19:41 +00:00
Add a thread to constantly read messages from the network
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import logging
|
||||
import pyaes
|
||||
from time import sleep
|
||||
from datetime import timedelta
|
||||
from hashlib import md5
|
||||
from os import path
|
||||
@@ -318,7 +318,8 @@ class TelegramBareClient:
|
||||
|
||||
try:
|
||||
self._sender.send(request)
|
||||
self._sender.receive(request, updates=updates)
|
||||
while not request.confirm_received:
|
||||
sleep(0.1) # TODO Use a proper lock
|
||||
return request.result
|
||||
|
||||
except ConnectionResetError:
|
||||
|
Reference in New Issue
Block a user