Changeset 14124


Ignore:
Timestamp:
Jul 16, 2013, 12:13:30 AM (9 years ago)
Author:
jordan
Message:

(trunk, libT) #5395: when announces fail, lower the period before the first retry to fix unspecified 'network problems'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/announcer.c

    r14068 r14124  
    963963getRetryInterval (const tr_tracker * t)
    964964{
    965     int minutes;
    966     const unsigned int jitter_seconds = tr_cryptoWeakRandInt (60);
    967     switch (t->consecutiveFailures) {
    968         case 0:  minutes =   1; break;
    969         case 1:  minutes =   5; break;
    970         case 2:  minutes =  15; break;
    971         case 3:  minutes =  30; break;
    972         case 4:  minutes =  60; break;
    973         default: minutes = 120; break;
    974     }
    975     return (minutes * 60) + jitter_seconds;
     965  switch (t->consecutiveFailures)
     966    {
     967      case 0:  return 20;
     968      case 1:  return tr_cryptoWeakRandInt (60) + (60 * 5);
     969      case 2:  return tr_cryptoWeakRandInt (60) + (60 * 15);
     970      case 3:  return tr_cryptoWeakRandInt (60) + (60 * 30);
     971      case 4:  return tr_cryptoWeakRandInt (60) + (60 * 60);
     972      default: return tr_cryptoWeakRandInt (60) + (60 * 120);
     973    }
    976974}
    977975
Note: See TracChangeset for help on using the changeset viewer.