refactor: ensure proper stopping of AddTorrentQueue

- Moved the setting of 'is_running' to after the queue join in the stop method for clearer logic flow.
- This change ensures that the queue is fully processed before marking the queue as not running.
This commit is contained in:
g0ldyy
2025-12-10 19:01:24 +01:00
parent ad42e90b3b
commit 7f5a0b87f2
+1 -1
View File
@@ -239,9 +239,9 @@ class AddTorrentQueue:
self.is_running = False
async def stop(self):
self.is_running = False
if not self.queue.empty():
await self.queue.join()
self.is_running = False
add_torrent_queue = AddTorrentQueue()