less aggressive removal of peer references

logging
This commit is contained in:
jrandom
2004-07-29 20:36:44 +00:00
committed by zzz
parent 3b9fea20b6
commit 25378e894b
3 changed files with 8 additions and 6 deletions

View File

@ -59,7 +59,7 @@ public class Shitlist {
wasAlready = (null == oldDate);
}
_context.netDb().fail(peer);
//_context.netDb().fail(peer);
_context.tunnelManager().peerFailed(peer);
return wasAlready;
}

View File

@ -32,7 +32,7 @@ class ExpireRoutersJob extends JobImpl {
private Log _log;
private KademliaNetworkDatabaseFacade _facade;
private final static long RERUN_DELAY_MS = 30*1000;
private final static long RERUN_DELAY_MS = 120*1000;
/**
* If a routerInfo structure isn't updated within an hour, drop it
* and search for a later version. This value should be large enough

View File

@ -506,13 +506,15 @@ public class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacade {
if (isRouterInfo) {
int remaining = _kb.size();
if (remaining < MIN_REMAINING_ROUTERS) {
_log.warn("Not removing " + dbEntry + " because we have so few routers left ("
+ remaining + ") - perhaps a reseed is necessary?");
if (_log.shouldLog(Log.ERROR))
_log.error("Not removing " + dbEntry + " because we have so few routers left ("
+ remaining + ") - perhaps a reseed is necessary?");
return;
}
if (System.currentTimeMillis() < _started + DONT_FAIL_PERIOD) {
_log.warn("Not failing the key " + dbEntry.toBase64()
+ " since we've just started up and don't want to drop /everyone/");
if (_log.shouldLog(Log.WARN))
_log.warn("Not failing the key " + dbEntry.toBase64()
+ " since we've just started up and don't want to drop /everyone/");
return;
}