mirror of
https://github.com/sivel/speedtest-cli.git
synced 2026-10-18 07:14:58 +02:00
Additionally, don't run callback if the shutdown_event is set
This commit is contained in:
+2
-2
@@ -784,7 +784,7 @@ class Speedtest(object):
|
|||||||
while thread.isAlive():
|
while thread.isAlive():
|
||||||
thread.join(timeout=0.1)
|
thread.join(timeout=0.1)
|
||||||
finished.append(sum(thread.result))
|
finished.append(sum(thread.result))
|
||||||
if callback:
|
if not shutdown_event.isSet() and callback:
|
||||||
callback(thread.i, url_count, end=True)
|
callback(thread.i, url_count, end=True)
|
||||||
del thread
|
del thread
|
||||||
|
|
||||||
@@ -835,7 +835,7 @@ class Speedtest(object):
|
|||||||
while thread.isAlive():
|
while thread.isAlive():
|
||||||
thread.join(timeout=0.1)
|
thread.join(timeout=0.1)
|
||||||
finished.append(thread.result)
|
finished.append(thread.result)
|
||||||
if callback:
|
if not shutdown_event.isSet() and callback:
|
||||||
callback(thread.i, size_count, end=True)
|
callback(thread.i, size_count, end=True)
|
||||||
del thread
|
del thread
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user