mirror of
https://github.com/balkian/bitter.git
synced 2024-12-22 00:18:12 +00:00
Fix concurrency issue
Download_list sometimes failed with: BrokenPipeError: [Errno 32] Broken pipe
This commit is contained in:
parent
fadeced761
commit
40a8b45231
@ -1 +1 @@
|
|||||||
0.9.6
|
0.9.7
|
||||||
|
@ -595,7 +595,9 @@ def download_list(wq, lst, folder, update=False, retry_failed=False, ignore_fail
|
|||||||
def gen():
|
def gen():
|
||||||
while True:
|
while True:
|
||||||
r = down.get()
|
r = down.get()
|
||||||
if not r:
|
if r is None:
|
||||||
|
down.close()
|
||||||
|
down.join_thread()
|
||||||
return
|
return
|
||||||
yield r
|
yield r
|
||||||
|
|
||||||
@ -622,6 +624,8 @@ def download_list(wq, lst, folder, update=False, retry_failed=False, ignore_fail
|
|||||||
rec = done.get()
|
rec = done.get()
|
||||||
|
|
||||||
if rec is None:
|
if rec is None:
|
||||||
|
done.close()
|
||||||
|
done.join_thread()
|
||||||
break
|
break
|
||||||
|
|
||||||
oid, obj = rec
|
oid, obj = rec
|
||||||
|
Loading…
Reference in New Issue
Block a user