Author: toad
Date: 2008-07-10 19:59:44 +0000 (Thu, 10 Jul 2008)
New Revision: 21037

Modified:
   branches/db4o/freenet/src/freenet/client/async/ClientRequestScheduler.java
Log:
Hopefully prevent selecting 50 of the same key from a SingleBlockInserter

Modified: 
branches/db4o/freenet/src/freenet/client/async/ClientRequestScheduler.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/ClientRequestScheduler.java  
2008-07-10 19:54:24 UTC (rev 21036)
+++ branches/db4o/freenet/src/freenet/client/async/ClientRequestScheduler.java  
2008-07-10 19:59:44 UTC (rev 21037)
@@ -516,7 +516,8 @@
                        int sameKey = 0;
                        while(true) {
                                req = null;
-                               if(lastReq != null && sameKey < 
MAX_CONSECUTIVE_SAME_REQ) {
+                               if(lastReq != null && sameKey < 
MAX_CONSECUTIVE_SAME_REQ &&
+                                               lastReq.getParentGrabArray() != 
null) {
                                        req = 
schedCore.maybeMakeChosenRequest(lastReq, container, context);
                                        sameKey++;
                                }


Reply via email to