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

Skip to content
Snippets Groups Projects
Commit 131ebc4d authored by zab2's avatar zab2
Browse files

do not write to disk if there are no new breaches #2666

parent 4e81e48d
No related branches found
No related tags found
No related merge requests found
......@@ -150,15 +150,16 @@ class AccessFilter implements StatefulConnectionFilter {
}
}
boolean newBreaches = false;
synchronized(unknownDests) {
for (DestTracker tracker : unknownDests.values()) {
if (!tracker.getCounter().isBreached(threshold, now))
continue;
breached.add(tracker.getHash().toBase32());
newBreaches |= breached.add(tracker.getHash().toBase32());
}
}
if (breached.isEmpty())
if (breached.isEmpty() || !newBreaches)
continue;
BufferedWriter writer = null;
......
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