set tracker error if no response

This commit is contained in:
orignal
2026-09-18 10:33:15 -04:00
parent e2c2cc080f
commit 3061fbdeb8
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -716,6 +716,7 @@ namespace torrents
CheckTrackerStatsSize (trackerID);
auto& [peers, trackerRequestInterval, nextRequestTime, seeders, leechers,
lastUpdateTime, error] = m_TrackerStats[trackerID];
error = "";
trackerRequestInterval = interval*1000; // milliseconds
nextRequestTime = i2p::util::GetMonotonicMilliseconds () + trackerRequestInterval;
seeders = numSeeders;
+2
View File
@@ -758,6 +758,8 @@ namespace torrents
}
if (ts >= it.second->GetNextTrackerRequestTime (i))
{
if (i2p::util::GetSecondsSinceEpoch () > it.second->GetLastTrackerUpdateTime (i) + 2*it.second->GetInterval (i)/1000 && it.second->GetTrackerError (i).empty ())
it.second->SetTrackerError (i, "No response");
if (RequestTracker (i, it.second, eTrackerAnnounceEventNone))
{
auto nextInterval = it.second->GetInterval (i) + GetLocalDestination ()->GetRng()() % TRACKER_REQUESTS_INTERVAL_VARIANCE;