mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Avoid hangs when downloading covers due to misbehaving plugins
This commit is contained in:
parent
dc80d92b1d
commit
83d3ee3118
@ -100,7 +100,8 @@ def run_download(log, results, abort,
|
|||||||
wait_time = msprefs['wait_after_first_cover_result']
|
wait_time = msprefs['wait_after_first_cover_result']
|
||||||
found_results = {}
|
found_results = {}
|
||||||
|
|
||||||
while True:
|
start_time = time.time() # Use a global timeout to workaround misbehaving plugins that hang
|
||||||
|
while time.time() - start_time < 301:
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
try:
|
try:
|
||||||
x = rq.get_nowait()
|
x = rq.get_nowait()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user