I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Unverified Commit ccba4a19 authored by zzz's avatar zzz
Browse files

Tunnels: Do not allow failed tunnels to be rebuilt

parent feaff690
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment