Telethon/telethon
Lonami Exo 341fb38136 Invoke getState after the server kicks us idling for updates
For some reason, the server seems to kick us after 1024 items from
the network are received. Tested with the following code, 1022
updates were received, after BadServerSalt, NewSessionCreated and
MsgsAck:

    client = TelegramClient(..., spawn_read_thread=False)
    client.connect(_sync_updates=False)
    sender = client._sender
    client = None
    while True:
        try:
            sender.receive(None)
        except TimeoutError:
            pass
        except ConnectionResetError:
            sender.connect()

If one were to run this code after being kicked no further items
will be retrieved and it will always timeout. Invoking a ping has
no effect either. Invoking some "high level" request like getState
seems to do the trick.
2018-02-03 15:39:37 +01:00
..
crypto Move utils.calc_msg_key into auth_key (cyclic imports py3.4) 2018-01-08 12:07:14 +01:00
errors Make exception types correspond to Python docs 2017-12-28 09:48:02 +10:00
extensions Except OSError with errno.WSAEACCES when connecting 2018-02-03 11:44:05 +01:00
network Add missing FutureSalts response special case (#81) 2018-01-30 18:32:42 +01:00
tl Override TLObject's __eq__ and __ne__ methods 2018-02-01 12:10:03 +01:00
__init__.py Use NullHandler as default for the library 2017-11-13 10:59:43 +01:00
helpers.py Move utils.calc_msg_key into auth_key (cyclic imports py3.4) 2018-01-08 12:07:14 +01:00
session.py Save session data when migrating from JSON (#570) 2018-01-31 21:01:53 +01:00
telegram_bare_client.py Invoke getState after the server kicks us idling for updates 2018-02-03 15:39:37 +01:00
telegram_client.py Raise error on .get_entity() on non-joined invite link 2018-02-02 17:24:12 +01:00
update_state.py Make a proper use of the logging module 2017-12-20 12:47:39 +01:00
utils.py Fix .download_media() not accepting Document 2018-01-23 12:10:23 +01:00
version.py Update to v0.16.2 2018-01-19 21:17:57 +01:00