Author: toad
Date: 2009-01-24 01:03:40 +0000 (Sat, 24 Jan 2009)
New Revision: 25255

Modified:
   branches/db4o/freenet/src/freenet/client/async/ClientRequestScheduler.java
Log:
Fix "Already on cooldown queue". This was caused by never adding anything to 
the runningPersistentRequests list.


Modified: 
branches/db4o/freenet/src/freenet/client/async/ClientRequestScheduler.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/ClientRequestScheduler.java  
2009-01-23 21:13:34 UTC (rev 25254)
+++ branches/db4o/freenet/src/freenet/client/async/ClientRequestScheduler.java  
2009-01-24 01:03:40 UTC (rev 25255)
@@ -493,10 +493,6 @@
                return false;
        }
        
-       void startingRequest(SendableRequest request) {
-               runningPersistentRequests.add(request);
-       }
-       
        /** The maximum number of requests that we will keep on the in-RAM 
request
         * starter queue. */
        static final int MAX_STARTER_QUEUE_SIZE = 512; // two full segments
@@ -553,6 +549,11 @@
                                                }
                                        }
                                        continue;
+                               } else {
+                                       // Prevent this request being selected, 
even though we may remove the PCR from the starter queue
+                                       // in the very near future. When the 
PCR finishes, the requests will be un-blocked.
+                                       
if(!runningPersistentRequests.contains(reqGroup.request))
+                                               
runningPersistentRequests.add(reqGroup.request);
                                }
                        }
                        if(finalLength < MAX_STARTER_QUEUE_SIZE)

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to