network_handler.py: Ensure stop() holds thread

This commit is contained in:
Mykola Grymalyuk
2023-02-03 21:18:13 -07:00
parent 4d89c220bf
commit eb1e29f95b

View File

@@ -301,5 +301,6 @@ class DownloadObject:
"""
self.should_stop = True
if self.active_thread.is_alive():
time.sleep(1)
if self.active_thread:
while self.active_thread.is_alive():
time.sleep(1)