Author: toad
Date: 2008-03-31 12:07:43 +0000 (Mon, 31 Mar 2008)
New Revision: 18867

Modified:
   trunk/freenet/src/freenet/client/async/ClientRequestScheduler.java
Log:
It could be the last element. In which case we wouldn't remove it, because of 
the order of the checks.

Modified: trunk/freenet/src/freenet/client/async/ClientRequestScheduler.java
===================================================================
--- trunk/freenet/src/freenet/client/async/ClientRequestScheduler.java  
2008-03-31 12:02:30 UTC (rev 18866)
+++ trunk/freenet/src/freenet/client/async/ClientRequestScheduler.java  
2008-03-31 12:07:43 UTC (rev 18867)
@@ -524,6 +524,10 @@
                                boolean found = false;
                                int x = 0;
                                for(int j=0;j<gets.length;j++) {
+                                       if(gets[j] == getter) {
+                                               found = true;
+                                               continue;
+                                       }
                                        if(j == newGets.length) {
                                                if(!found) {
                                                        if(complain)
@@ -531,10 +535,6 @@
                                                        return; // not here
                                                }
                                        }
-                                       if(gets[j] == getter) {
-                                               found = true;
-                                               continue;
-                                       }
                                        if(gets[j] == null || 
gets[j].isCancelled()) continue;
                                        newGets[x++] = gets[j];
                                }


Reply via email to