From 4db6f32ea764872aa58d70f449268939c87dfdf4 Mon Sep 17 00:00:00 2001 From: Daniel Bengtsson Date: Tue, 10 Dec 2024 15:51:39 +0100 Subject: [PATCH] Skip further tracker requests if stopped --- src/torrent.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/torrent.cpp b/src/torrent.cpp index 6dab9a8..48b8e5a 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -839,6 +839,9 @@ std::vector> Torrent::tracker_request( std::ranges::shuffle(tier, g); for (const auto& announce_url : tier) { try { + if (m_stopped && event != TrackerEvent::STOPPED) { + break; + } std::tie(success, peers_from_tracker) = do_tracker_request(announce_url); thrown = nullptr;