mirror of
https://github.com/transmission/transmission
synced 2024-12-26 01:27:28 +00:00
(libT) #1045: gracefully handle trackers that return a scrape interval that's too low
This commit is contained in:
parent
5493046090
commit
70e21e93ff
1 changed files with 5 additions and 0 deletions
|
@ -491,6 +491,11 @@ onScrapeResponse( tr_session * session,
|
|||
if(( tr_bencDictFindInt( flags, "min_request_interval", &itmp )))
|
||||
t->scrapeIntervalSec = i;
|
||||
|
||||
/* as per ticket #1045, safeguard against trackers returning
|
||||
* a very low min_request_interval... */
|
||||
if( t->scrapeIntervalSec < DEFAULT_SCRAPE_INTERVAL_SEC )
|
||||
t->scrapeIntervalSec = DEFAULT_SCRAPE_INTERVAL_SEC;
|
||||
|
||||
tr_ndbg( t->name, "Scrape successful. Rescraping in %d seconds.",
|
||||
t->scrapeIntervalSec );
|
||||
|
||||
|
|
Loading…
Reference in a new issue