Changeset 38dba5d1


Ignore:
Timestamp:
Jan 17, 2012 3:04:52 AM (9 years ago)
Author:
str4d <str4d@…>
Branches:
master
Children:
dafd722
Parents:
bafdaeb (diff), b1878d6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge of 'a5d2fae48cf001c84ff5cea42466e1f3ed7d5f0a'

and 'c52409bf5d7b422c23a62eecfa50b98d7c74f8df'

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • history.txt

    rbafdaeb r38dba5d1  
     12012-01-16 hottuna
     2  * Router:
     3    - Don't throttle tunnel creation if using a higher
     4    - than default router.maxParticipatingTunnels setting.
     5
    162012-01-16 zzz
    27  * Build: Put Implementation-Version in manifests
  • router/java/src/net/i2p/router/RouterThrottleImpl.java

    rbafdaeb r38dba5d1  
    179179            }
    180180        }
     181
    181182       
    182183        int numTunnels = _context.tunnelManager().getParticipatingCount();
    183 
    184         if (numTunnels > getMinThrottleTunnels()) {
     184        int maxTunnels = _context.getProperty(PROP_MAX_TUNNELS, DEFAULT_MAX_TUNNELS);
     185
     186        // Throttle tunnels if min. throttle level is exceeded and default max participating tunnels (or fewer) is used.
     187        if ((numTunnels > getMinThrottleTunnels()) && (DEFAULT_MAX_TUNNELS <= maxTunnels)) {
    185188            double tunnelGrowthFactor = getTunnelGrowthFactor();
    186189            Rate avgTunnels = _context.statManager().getRate("tunnel.participatingTunnels").getRate(10*60*1000);
     
    261264        }
    262265       
    263         int max = _context.getProperty(PROP_MAX_TUNNELS, DEFAULT_MAX_TUNNELS);
    264         if (numTunnels >= max) {
     266        if (numTunnels >= maxTunnels) {
    265267            if (_log.shouldLog(Log.WARN))
    266268                _log.warn("Refusing tunnel request since we are already participating in "
    267                           + numTunnels + " (our max is " + max + ")");
     269                          + numTunnels + " (our max is " + maxTunnels + ")");
    268270            _context.statManager().addRateData("router.throttleTunnelMaxExceeded", numTunnels, 0);
    269271            setTunnelStatus(_x("Rejecting tunnels: Limit reached"));
Note: See TracChangeset for help on using the changeset viewer.