(trunk, libT) #5432 'on scrape and announce failures, the retry interval is longer than intended' -- fixed.
This commit is contained in:
parent
773d276fb5
commit
4787364b1a
|
@ -962,13 +962,16 @@ tr_announcerRemoveTorrent (tr_announcer * announcer, tr_torrent * tor)
|
|||
static int
|
||||
getRetryInterval (const tr_tracker * t)
|
||||
{
|
||||
assert (t->consecutiveFailures >= 1);
|
||||
|
||||
switch (t->consecutiveFailures)
|
||||
{
|
||||
case 0: return 20;
|
||||
case 1: return tr_cryptoWeakRandInt (60) + (60 * 5);
|
||||
case 2: return tr_cryptoWeakRandInt (60) + (60 * 15);
|
||||
case 3: return tr_cryptoWeakRandInt (60) + (60 * 30);
|
||||
case 4: return tr_cryptoWeakRandInt (60) + (60 * 60);
|
||||
case 0: return 0;
|
||||
case 1: return 20;
|
||||
case 2: return tr_cryptoWeakRandInt (60) + (60 * 5);
|
||||
case 3: return tr_cryptoWeakRandInt (60) + (60 * 15);
|
||||
case 4: return tr_cryptoWeakRandInt (60) + (60 * 30);
|
||||
case 5: return tr_cryptoWeakRandInt (60) + (60 * 60);
|
||||
default: return tr_cryptoWeakRandInt (60) + (60 * 120);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue