forked from I2P_Developers/i2p.i2p
Tunnels: Add another tier for client tunnel build limiter
only if configured for 6 or more tunnels
This commit is contained in:
@@ -338,10 +338,14 @@ public class TunnelPool {
|
||||
// throttle client tunnel builds in times of congestion
|
||||
int fails = _consecutiveBuildTimeouts.get();
|
||||
if (fails > 4) {
|
||||
if (fails > 8) {
|
||||
if (fails > 12) {
|
||||
rv = 1;
|
||||
if (_log.shouldWarn())
|
||||
_log.warn("Limit to 1 tunnel after " + fails + " consec. build timeouts on " + this);
|
||||
} else if (fails > 8) {
|
||||
rv = Math.max(1, rv / 3);
|
||||
if (_log.shouldWarn())
|
||||
_log.warn("Limit to " + rv + " tunnels after " + fails + " consec. build timeouts on " + this);
|
||||
} else if (rv > 2) {
|
||||
rv--;
|
||||
if (_log.shouldWarn())
|
||||
|
||||
Reference in New Issue
Block a user