Revert async sessions from 3dd8b7c (breaks sync properties)

Such as ChatGetter.input_chat and SenderGetter.input_sender
which rely on the fact that access to the session file will
be synchronous.
This commit is contained in:
Lonami Exo
2018-10-12 22:00:02 +02:00
parent e677a6bb05
commit cf6686ff42
6 changed files with 29 additions and 21 deletions

View File

@@ -223,9 +223,9 @@ class DownloadMethods(UserMethods):
config = await self(functions.help.GetConfigRequest())
for option in config.dc_options:
if option.ip_address == self.session.server_address:
await self.session.set_dc(
self.session.set_dc(
option.id, option.ip_address, option.port)
await self.session.save()
self.session.save()
break
# TODO Figure out why the session may have the wrong DC ID