mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-12 09:34:50 +02:00
Kill the timer process if it doesn't properly terminate.
This commit is contained in:
@@ -152,6 +152,11 @@ class TimedProgress:
|
|||||||
except BaseException: # lgtm [py/catch-base-exception]
|
except BaseException: # lgtm [py/catch-base-exception]
|
||||||
pass
|
pass
|
||||||
self.p.terminate()
|
self.p.terminate()
|
||||||
|
time.sleep(0.1)
|
||||||
|
# sometimes the timer doesn't terminate properly, then blocks at the join until
|
||||||
|
# the full time has elapsed. sending a kill tries to avoid that.
|
||||||
|
if self.p.is_alive():
|
||||||
|
self.p.kill()
|
||||||
self.p.join()
|
self.p.join()
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user