Fix -503 Timeout errors #664 (#812)

This commit is contained in:
AduchiMergen 2021-12-21 02:22:56 +07:00 committed by GitHub
parent a917596cb1
commit ef6125b57a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -916,9 +916,6 @@ class Client(Methods, Scaffold):
while True:
chunk = r.bytes
if not chunk:
break
f.write(chunk)
offset += limit
@ -938,6 +935,9 @@ class Client(Methods, Scaffold):
else:
await self.loop.run_in_executor(self.executor, func)
if len(chunk) < limit:
break
r = await session.send(
raw.functions.upload.GetFile(
location=location,