diff --git a/core/src/main/groovy/com/muwire/core/connection/Connection.groovy b/core/src/main/groovy/com/muwire/core/connection/Connection.groovy index b1b2ad64..790a1a26 100644 --- a/core/src/main/groovy/com/muwire/core/connection/Connection.groovy +++ b/core/src/main/groovy/com/muwire/core/connection/Connection.groovy @@ -162,8 +162,10 @@ abstract class Connection implements Closeable { private boolean throttleSearch() { final long now = System.currentTimeMillis() - if (searchTimestamps.size() < SEARCHES) + if (searchTimestamps.size() < SEARCHES) { + searchTimestamps.addLast(now) return false + } Long oldest = searchTimestamps.getFirst() if (now - oldest.longValue() < INTERVAL) return true