Changeset 1187


Ignore:
Timestamp:
Dec 11, 2006, 4:12:40 PM (15 years ago)
Author:
livings124
Message:

randomize announce within a minute for the normal announce

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/multitracker/libtransmission/tracker.c

    r1185 r1187  
    6262    int            hasManyPeers;
    6363    int            complete;
     64    int            randOffset;
    6465
    6566    uint64_t       dateTry;
     
    233234       anyway */
    234235    if( tc->lastAttempt == TC_ATTEMPT_ERROR &&
    235         now < tc->dateTry + 1000 * tc->interval )
     236        now < tc->dateTry + 1000 * tc->interval + tc->randOffset )
    236237    {
    237238        return 0;
     
    245246
    246247    /* Should we try and get more peers? */
    247     if( now > tc->dateOk + 1000 * tc->interval )
     248    if( now > tc->dateOk + 1000 * tc->interval + tc->randOffset )
    248249    {
    249250        return 1;
     
    319320    if( ( NULL == tc->http ) && shouldConnect( tc ) )
    320321    {
     322        tc->randOffset = tr_rand( 60000 );
     323       
    321324        if( tc->shouldChangeAnnounce )
    322325        {
Note: See TracChangeset for help on using the changeset viewer.