forked from I2P_Developers/i2p.i2p
Throttle: Fix disable of probabalistic throttling (ticket #1963)
Fixes this checkin: Revision: c52409bf5d7b422c23a62eecfa50b98d7c74f8df Date: 01/16/2012 Branch: i2p.i2p Don't throttle tunnel creation if using a higher than default router.maxParticipatingTunnels setting.
This commit is contained in:
@ -197,8 +197,11 @@ public class RouterThrottleImpl implements RouterThrottle {
|
||||
return TunnelHistory.TUNNEL_REJECT_BANDWIDTH;
|
||||
}
|
||||
|
||||
// Throttle tunnels if min. throttle level is exceeded and default max participating tunnels (or fewer) is used.
|
||||
if ((numTunnels > getMinThrottleTunnels()) && (DEFAULT_MAX_TUNNELS <= maxTunnels)) {
|
||||
/*
|
||||
* Throttle if we go above a minimum level of tunnels AND the maximum participating
|
||||
* tunnels is default or lower.
|
||||
*/
|
||||
if ((numTunnels > getMinThrottleTunnels()) && (DEFAULT_MAX_TUNNELS >= maxTunnels)) {
|
||||
Rate avgTunnels = _context.statManager().getRate("tunnel.participatingTunnels").getRate(10*60*1000);
|
||||
if (avgTunnels != null) {
|
||||
double avg = avgTunnels.getAvgOrLifetimeAvg();
|
||||
|
Reference in New Issue
Block a user