Author: toad
Date: 2008-02-18 11:33:10 +0000 (Mon, 18 Feb 2008)
New Revision: 18029

Modified:
   trunk/freenet/src/freenet/client/async/RequestCooldownQueue.java
Log:
holes was decremented but not incremented. So eventually it will cause 
expandQueue() to fail.

Modified: trunk/freenet/src/freenet/client/async/RequestCooldownQueue.java
===================================================================
--- trunk/freenet/src/freenet/client/async/RequestCooldownQueue.java    
2008-02-18 11:25:36 UTC (rev 18028)
+++ trunk/freenet/src/freenet/client/async/RequestCooldownQueue.java    
2008-02-18 11:33:10 UTC (rev 18029)
@@ -164,6 +164,7 @@
                if(idx < 0) return false;
                if(keys[idx] == key) {
                        keys[idx] = null;
+                       holes++;
                        if(logMINOR) Logger.minor(this, "Found (exact)");
                        return true;
                }
@@ -173,6 +174,7 @@
                        if(times[nidx] != time) break;
                        if(keys[nidx] == key) {
                                keys[nidx] = null;
+                               holes++;
                                if(logMINOR) Logger.minor(this, "Found 
(backwards)");
                                return true;
                        }
@@ -186,6 +188,7 @@
                        if(times[nidx] != time) break;
                        if(keys[nidx] == key) {
                                keys[nidx] = null;
+                               holes++;
                                if(logMINOR) Logger.minor(this, "Found 
(forwards)");
                                return true;
                        }


Reply via email to