Invoke getState after the server kicks us idling for updates
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.

LonamiWebs/Telethon,LonamiWebs/Telethon,expectocode/Telethon,LonamiWebs/Telethon,LonamiWebs/Telethon