Persist updates.State upon disconnection

This commit is contained in:
Lonami Exo
2018-04-25 13:37:29 +02:00
parent e2a0de1913
commit 2a00bcaa12
5 changed files with 49 additions and 0 deletions

View File

@@ -275,6 +275,7 @@ class TelegramBareClient:
# TODO Shall we clear the _exported_sessions, or may be reused?
self._first_request = True # On reconnect it will be first again
self.session.set_update_state(0, self.updates.get_update_state(0))
self.session.close()
def _reconnect(self, new_dc=None):