Don't flush each chunk. Let python/os deal with it

This commit is contained in:
Dan 2018-07-11 17:05:33 +02:00
parent 68ea889824
commit 0c96fa8b7c

View File

@ -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