Changeset d7a4e03


Ignore:
Timestamp:
Sep 1, 2011 1:50:17 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
1bd71ab
Parents:
cdb6313
Message:

explore more aggressively if hidden or K

File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/networkdb/kademlia/StartExplorersJob.java

    rcdb6313 rd7a4e03  
    1313
    1414import net.i2p.data.Hash;
     15import net.i2p.data.RouterInfo;
    1516import net.i2p.router.JobImpl;
     17import net.i2p.router.Router;
    1618import net.i2p.router.RouterContext;
    1719import net.i2p.util.Log;
     
    9395
    9496        // If we don't know too many peers, or just started, explore aggressively
     97        // Also if hidden or K, as nobody will be connecting to us
    9598        // Use DataStore.size() which includes leasesets because it's faster
    9699        if (getContext().router().getUptime() < STARTUP_TIME ||
    97             _facade.getDataStore().size() < MIN_ROUTERS)
     100            _facade.getDataStore().size() < MIN_ROUTERS ||
     101            getContext().router().isHidden())
     102            return MIN_RERUN_DELAY_MS;
     103        RouterInfo ri = getContext().router().getRouterInfo();
     104        if (ri != null && ri.getCapabilities().contains("" + Router.CAPABILITY_BW12))
    98105            return MIN_RERUN_DELAY_MS;
    99106        if (_facade.getDataStore().size() > MAX_ROUTERS)
Note: See TracChangeset for help on using the changeset viewer.