mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-28 09:05:13 +00:00
Don't flush each chunk. Let python/os deal with it
This commit is contained in:
parent
68ea889824
commit
0c96fa8b7c
@ -1240,8 +1240,6 @@ class Client(Methods, BaseClient):
|
||||
break
|
||||
|
||||
f.write(chunk)
|
||||
f.flush()
|
||||
os.fsync(f.fileno())
|
||||
|
||||
offset += limit
|
||||
|
||||
@ -1324,8 +1322,6 @@ class Client(Methods, BaseClient):
|
||||
assert h.hash == sha256(cdn_chunk).digest(), "Invalid CDN hash part {}".format(i)
|
||||
|
||||
f.write(decrypted_chunk)
|
||||
f.flush()
|
||||
os.fsync(f.fileno())
|
||||
|
||||
offset += limit
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user