mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-06 15:14:52 +00:00
parent
a917596cb1
commit
ef6125b57a
1 changed files with 3 additions and 3 deletions
|
|
@ -916,9 +916,6 @@ class Client(Methods, Scaffold):
|
||||||
while True:
|
while True:
|
||||||
chunk = r.bytes
|
chunk = r.bytes
|
||||||
|
|
||||||
if not chunk:
|
|
||||||
break
|
|
||||||
|
|
||||||
f.write(chunk)
|
f.write(chunk)
|
||||||
|
|
||||||
offset += limit
|
offset += limit
|
||||||
|
|
@ -938,6 +935,9 @@ class Client(Methods, Scaffold):
|
||||||
else:
|
else:
|
||||||
await self.loop.run_in_executor(self.executor, func)
|
await self.loop.run_in_executor(self.executor, func)
|
||||||
|
|
||||||
|
if len(chunk) < limit:
|
||||||
|
break
|
||||||
|
|
||||||
r = await session.send(
|
r = await session.send(
|
||||||
raw.functions.upload.GetFile(
|
raw.functions.upload.GetFile(
|
||||||
location=location,
|
location=location,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue