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

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

* PeerManager: Don't reorganize as often if it takes too long (ticket #765)

parent 70a2e330
No related branches found
No related tags found
No related merge requests found
......@@ -89,14 +89,16 @@ class PeerManager {
super(_context.simpleTimer2(), REORGANIZE_TIME);
}
public void timeReached() {
long start = System.currentTimeMillis();
try {
_organizer.reorganize(true);
} catch (Throwable t) {
_log.log(Log.CRIT, "Error evaluating profiles", t);
}
long orgtime = System.currentTimeMillis() - start;
long uptime = _context.router().getUptime();
long delay;
if (uptime > 2*60*60*1000)
if (orgtime > 1000 || uptime > 2*60*60*1000)
delay = REORGANIZE_TIME_LONG;
else if (uptime > 10*60*1000)
delay = REORGANIZE_TIME_MEDIUM;
......
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