(trunk, libT) fix for #2269 ("error message cleared unexpectedly"): a successful scrape clears the error message, and there's no point in scraping an error torrent anyway, so don't scrape until the torrent's error is cleared by a successful announce.

This commit is contained in:
Charles Kerr 2009-08-12 20:12:52 +00:00
parent 306d26a97c
commit 8e4d837967
1 changed files with 11 additions and 2 deletions

View File

@ -983,8 +983,17 @@ trackerPulse( void * vsession )
&& ( t->scrapeAt <= now )
&& ( trackerSupportsScrape( t, tor ) ) )
{
t->scrapeAt = TR_TRACKER_BUSY;
enqueueScrape( session, t );
if( ( tor->error == TR_STAT_TRACKER_ERROR ) || ( tor->error == TR_STAT_LOCAL_ERROR ) )
{
/* keep deferring the scrape until the errors are resolved.
there's no point in wasting a round trip on this torrent until then. */
t->scrapeAt = now + t->scrapeIntervalSec + t->randOffset;
}
else
{
t->scrapeAt = TR_TRACKER_BUSY;
enqueueScrape( session, t );
}
}
if( ( t->reannounceAt > 1 )