diff --git a/router/java/src/net/i2p/router/tunnel/TunnelCreatorConfig.java b/router/java/src/net/i2p/router/tunnel/TunnelCreatorConfig.java index 001de5b148f3257bbfefee43438fec6fe4cb4426..df7586fe37667b880979c59075b6258600893818 100644 --- a/router/java/src/net/i2p/router/tunnel/TunnelCreatorConfig.java +++ b/router/java/src/net/i2p/router/tunnel/TunnelCreatorConfig.java @@ -217,7 +217,11 @@ public abstract class TunnelCreatorConfig implements TunnelInfo { * @return false if we stopped using it, true if still ok */ public boolean tunnelFailed() { - return _failures.incrementAndGet() <= MAX_CONSECUTIVE_TEST_FAILURES; + boolean rv = _failures.incrementAndGet() <= MAX_CONSECUTIVE_TEST_FAILURES; + // don't allow it to be rebuilt + if (!rv) + _reused = true; + return rv; } /** @@ -227,6 +231,8 @@ public abstract class TunnelCreatorConfig implements TunnelInfo { */ public void tunnelFailedCompletely() { _failures.addAndGet(MAX_CONSECUTIVE_TEST_FAILURES + 1); + // don't allow it to be rebuilt + _reused = true; } /**