Author: toad
Date: 2009-04-03 14:38:14 +0000 (Fri, 03 Apr 2009)
New Revision: 26447

Modified:
   trunk/freenet/src/freenet/client/async/PersistentChosenRequest.java
Log:
More onDumped()


Modified: trunk/freenet/src/freenet/client/async/PersistentChosenRequest.java
===================================================================
--- trunk/freenet/src/freenet/client/async/PersistentChosenRequest.java 
2009-04-03 14:36:12 UTC (rev 26446)
+++ trunk/freenet/src/freenet/client/async/PersistentChosenRequest.java 
2009-04-03 14:38:14 UTC (rev 26447)
@@ -285,7 +285,10 @@
                }
        }
 
-       public synchronized void pruneDuplicates(ClientRequestScheduler sched) {
+       public void pruneDuplicates(ClientRequestScheduler sched) {
+               ArrayList<PersistentChosenBlock> dumped = null;
+               try {
+               synchronized(this) {
                for(int i=0;i<blocksNotStarted.size();i++) {
                        PersistentChosenBlock block = blocksNotStarted.get(i);
                        Key key = block.key;
@@ -296,5 +299,12 @@
                                i--;
                        }
                }
+               }
+               } finally {
+                       if(dumped != null) {
+                               for(PersistentChosenBlock block : dumped)
+                                       block.onDumped();
+                       }
+               }
        }
 }

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

Reply via email to