]> granicus.if.org Git - transmission/commitdiff
(trunk libT) use get_next_scrape_time() inside the scrape error handler.
authorJordan Lee <jordan@transmissionbt.com>
Thu, 7 Apr 2011 20:00:26 +0000 (20:00 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Thu, 7 Apr 2011 20:00:26 +0000 (20:00 +0000)
get_next_scrape_time() was introduced in r12297. The rationale is that by rounding all scrape times to their nearest 10th second, they will tend to occur in batches and improve multiscrape.

libtransmission/announcer.c

index 23f7a40778d2ebd0f1efa65e81dcbd687dbc3f74..d4045dfa8a9329848008d42b7865f28caf6350cf 100644 (file)
@@ -1183,7 +1183,7 @@ on_scrape_error( tr_tier * tier, const char * errmsg )
     tierIncrementTracker( tier );
 
     /* schedule a rescrape */
-    interval = getRetryInterval( tier->currentTracker );
+    interval = get_next_scrape_time( getRetryInterval( tier->currentTracker ) );
     dbgmsg( tier, "Retrying scrape in %d seconds.", interval );
     tr_torinf( tier->tor, "Retrying scrape in %d seconds.", interval );
     tier->lastScrapeSucceeded = false;