Higher timeout and log them as warning if any data was received

This might be the cause for  "number of retries reached 0" so
more specific logging calls might be useful. If while reading
a response it times out but  some data had already been read,
said data will be lost.

The sequence of events that triggered reaching 0 retries was:
- Sending requests with IDs XYZ
- socket.timeout while reading
- Items timed out. Retrying
- Processing RPC result
- Received response for XYZ
- Lost request with ID XYZ
This commit is contained in:
Lonami Exo
2018-03-18 20:01:19 +01:00
parent 35eccc0ba3
commit 987cf41ec6
2 changed files with 11 additions and 3 deletions

View File

@@ -170,7 +170,7 @@ class TelegramClient(TelegramBareClient):
use_ipv6=False,
proxy=None,
update_workers=None,
timeout=timedelta(seconds=5),
timeout=timedelta(seconds=10),
spawn_read_thread=True,
report_errors=True,
**kwargs):