Changeset 12033


Ignore:
Timestamp:
Feb 24, 2011, 3:42:04 PM (11 years ago)
Author:
jordan
Message:

(2.2x) backport r11893 for #4028 "IPv6 DHT broken" -- fixed by jch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2x/libtransmission/tr-dht.c

    r11852 r12033  
    231231    }
    232232
    233     /* We really don't want to abuse our bootstrap nodes.
    234        Be glacially slow. */
    235     if(!bootstrap_done(cl->session, 0))
    236         nap(30);
    237 
    238233    if(!bootstrap_done(cl->session, 0)) {
    239         tr_ninf("DHT", "Attempting bootstrap from dht.transmissionbt.com");
    240         bootstrap_from_name( "dht.transmissionbt.com", 6881,
    241                              bootstrap_af(session) );
     234        for(i = 0; i < 6; i++) {
     235            /* We don't want to abuse our bootstrap nodes, so be very
     236               slow.  The initial wait is to give other nodes a chance
     237               to contact us before we attempt to contact a bootstrap
     238               node, for example because we've just been restarted. */
     239            nap(40);
     240            if(bootstrap_done(cl->session, 0))
     241                break;
     242            if(i == 0)
     243                tr_ninf("DHT",
     244                        "Attempting bootstrap from dht.transmissionbt.com");
     245            bootstrap_from_name( "dht.transmissionbt.com", 6881,
     246                                 bootstrap_af(session) );
     247        }
    242248    }
    243249
Note: See TracChangeset for help on using the changeset viewer.