mirror of
https://github.com/pyrogram/pyrogram
synced 2025-09-02 07:15:23 +00:00
Don't flush each chunk. Let python/os deal with it
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user