int downloadCount;
int downloaderCount;
- int consecutiveAnnounceFailures;
+ int consecutiveFailures;
uint32_t id;
}
{
int minutes;
const unsigned int jitter_seconds = tr_cryptoWeakRandInt( 60 );
- switch( t->consecutiveAnnounceFailures ) {
+ switch( t->consecutiveFailures ) {
case 0: minutes = 1; break;
case 1: minutes = 5; break;
case 2: minutes = 15; break;
{
int interval;
+ /* increment the error count */
+ if( tier->currentTracker != NULL )
+ ++tier->currentTracker->consecutiveFailures;
+
/* set the error message */
dbgmsg( tier, "%s", err );
tr_torinf( tier->tor, "%s", err );
tier->isAnnouncing = FALSE;
tier->manualAnnounceAllowedAt = now + tier->announceMinIntervalSec;
- if(( tracker = tier->currentTracker ))
- ++tracker->consecutiveAnnounceFailures;
-
if( !response->did_connect )
{
on_announce_error( tier, _( "Could not connect to tracker" ), event );
publishErrorClear( tier );
if(( tracker = tier->currentTracker ))
- tracker->consecutiveAnnounceFailures = 0;
+ tracker->consecutiveFailures = 0;
if(( str = response->warning ))
{
{
int interval;
+ /* increment the error count */
+ if( tier->currentTracker != NULL )
+ ++tier->currentTracker->consecutiveFailures;
+
/* set the error message */
dbgmsg( tier, "Scrape error: %s", errmsg );
tr_torinf( tier->tor, "Scrape error: %s", errmsg );
tracker->leecherCount = row->leechers;
tracker->downloadCount = row->downloads;
tracker->downloaderCount = row->downloaders;
+ tracker->consecutiveFailures = 0;
}
}
}