From 8423f43209e716e6bb9138c241a8529a9b7ce8cf Mon Sep 17 00:00:00 2001 From: an0n666 <47396879+an0n666@users.noreply.github.com> Date: Fri, 14 Feb 2020 09:39:57 +0000 Subject: [PATCH] Do not list not contacted trackers as error --- src/base/bittorrent/torrenthandle.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/base/bittorrent/torrenthandle.cpp b/src/base/bittorrent/torrenthandle.cpp index 0fd0bd6c1..ebde146af 100644 --- a/src/base/bittorrent/torrenthandle.cpp +++ b/src/base/bittorrent/torrenthandle.cpp @@ -1654,14 +1654,13 @@ void TorrentHandle::handleTrackerErrorAlert(const lt::tracker_error_alert *p) // Starting with libtorrent 1.2.x each tracker has multiple local endpoints from which // an announce is attempted. Some endpoints might succeed while others might fail. - // Emit the signal only if all endpoints have failed. TrackerEntry::isWorking() returns - // true if at least one endpoint works. + // Emit the signal only if all endpoints have failed. const QVector trackerList = trackers(); const auto iter = std::find_if(trackerList.cbegin(), trackerList.cend(), [&trackerUrl](const TrackerEntry &entry) { return (entry.url() == trackerUrl); }); - if ((iter != trackerList.cend()) && !iter->isWorking()) + if ((iter != trackerList.cend()) && (iter->status() == TrackerEntry::NotWorking)) m_session->handleTorrentTrackerError(this, trackerUrl); }