diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/access/AccessCounter.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/access/AccessCounter.java index 4dddb1cf6..8056cf07f 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/access/AccessCounter.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/access/AccessCounter.java @@ -38,7 +38,7 @@ class AccessCounter { for (int i = 0; i <= accesses.size() - threshold.getConnections(); i++) { long start = accesses.get(i); - long end = start + threshold.getMinutes() * 60000; + long end = start + threshold.getSeconds() * 1000; if (accesses.get(i + threshold.getConnections() -1) <= end) return true; } diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/access/AccessFilter.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/access/AccessFilter.java index b8c3a3dfd..5958e270b 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/access/AccessFilter.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/access/AccessFilter.java @@ -156,7 +156,7 @@ class AccessFilter implements StatefulConnectionFilter { } private void purge() { - long olderThan = context.clock().now() - definition.getPurgeMinutes() * 60000; + long olderThan = context.clock().now() - definition.getPurgeSeconds() * 1000; synchronized(knownDests) { for (DestTracker tracker : knownDests.values()) { diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/access/DefinitionParser.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/access/DefinitionParser.java index d51129953..fdfb4c1a8 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/access/DefinitionParser.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/access/DefinitionParser.java @@ -43,16 +43,16 @@ class DefinitionParser { *

*

* A threshold is defined by the number of connection attempts a remote destination is - * permitted to perform over a specified number of minutes before a "breach" occurs. + * permitted to perform over a specified number of seconds before a "breach" occurs. * For example the following threshold definition "15/5" means that the same remote - * destination is allowed to make 14 connection attempts over a 5 minute period, If + * destination is allowed to make 14 connection attempts over a 5 second period, If * it makes one more attempt within the same period, the threshold will be breached. *

*

* The threshold format can be one of the following: *

*