Avoid hangs when downloading covers due to misbehaving plugins

This commit is contained in:
Kovid Goyal 2013-09-25 22:11:58 +05:30
parent dc80d92b1d
commit 83d3ee3118

View File

@ -100,7 +100,8 @@ def run_download(log, results, abort,
wait_time = msprefs['wait_after_first_cover_result']
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)
try:
x = rq.get_nowait()