mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
rate-limit sync progress messages for win32 installs with huge net bufs
This commit is contained in:
parent
ca07cb8f26
commit
7c45bab35a
1 changed files with 3 additions and 1 deletions
|
@ -74,9 +74,11 @@ def incrementalSend(self, strOrFile):
|
|||
self.sock.sendall(strOrFile)
|
||||
else:
|
||||
cnt = 0
|
||||
t = time.time()
|
||||
while 1:
|
||||
if sendProgressHook:
|
||||
if sendProgressHook and time.time() - t > 1:
|
||||
sendProgressHook(cnt)
|
||||
t = time.time()
|
||||
data = strOrFile.read(CHUNK_SIZE)
|
||||
cnt += len(data)
|
||||
if not data:
|
||||
|
|
Loading…
Reference in a new issue