mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-09-01 00:22:09 +00:00
Merge pull request #11999 from an0n666/fix-not-contacted-tracker
Do not list not contacted trackers as error
This commit is contained in:
commit
04132f6266
@ -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
|
// 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.
|
// an announce is attempted. Some endpoints might succeed while others might fail.
|
||||||
// Emit the signal only if all endpoints have failed. TrackerEntry::isWorking() returns
|
// Emit the signal only if all endpoints have failed.
|
||||||
// true if at least one endpoint works.
|
|
||||||
const QVector<TrackerEntry> trackerList = trackers();
|
const QVector<TrackerEntry> trackerList = trackers();
|
||||||
const auto iter = std::find_if(trackerList.cbegin(), trackerList.cend(), [&trackerUrl](const TrackerEntry &entry)
|
const auto iter = std::find_if(trackerList.cbegin(), trackerList.cend(), [&trackerUrl](const TrackerEntry &entry)
|
||||||
{
|
{
|
||||||
return (entry.url() == trackerUrl);
|
return (entry.url() == trackerUrl);
|
||||||
});
|
});
|
||||||
if ((iter != trackerList.cend()) && !iter->isWorking())
|
if ((iter != trackerList.cend()) && (iter->status() == TrackerEntry::NotWorking))
|
||||||
m_session->handleTorrentTrackerError(this, trackerUrl);
|
m_session->handleTorrentTrackerError(this, trackerUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user