[tor-commits] [metrics-web/master] Try harder only to run a second relay-search query when necessary.

karsten at torproject.org karsten at torproject.org
Tue Jan 10 10:09:34 UTC 2012


commit 075fd8e0df632d6afa88cacccc47f845e07031a4
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Tue Jan 10 11:07:06 2012 +0100

    Try harder only to run a second relay-search query when necessary.
    
    444f874c missed the fact that the first query may return more than 31
    results, in which case we don't have to run the second query anymore.
    Include this case.
---
 .../torproject/ernie/web/RelaySearchServlet.java   |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/org/torproject/ernie/web/RelaySearchServlet.java b/src/org/torproject/ernie/web/RelaySearchServlet.java
index 82d223b..8d47667 100644
--- a/src/org/torproject/ernie/web/RelaySearchServlet.java
+++ b/src/org/torproject/ernie/web/RelaySearchServlet.java
@@ -411,7 +411,7 @@ public class RelaySearchServlet extends HttpServlet {
         }
         rs.close();
         statement.close();
-        if (matches == 31) {
+        if (matches >= 31) {
           queries.clear();
         }
       }



More information about the tor-commits mailing list