Author: toad
Date: 2007-02-17 01:35:35 +0000 (Sat, 17 Feb 2007)
New Revision: 11830

Modified:
   trunk/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java
Log:
Maybe fixed?

Modified: trunk/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java
===================================================================
--- trunk/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java      
2007-02-17 01:32:02 UTC (rev 11829)
+++ trunk/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java      
2007-02-17 01:35:35 UTC (rev 11830)
@@ -129,6 +129,17 @@
        }

        public void onSuccess(ClientKeyBlock block, boolean fromStore, int 
token) {
+               if(fromStore) {
+                       synchronized(this) {
+                               for(int i=0;i<blockNums.size();i++) {
+                                       Integer x = (Integer) blockNums.get(i);
+                                       if(x.intValue() == token) {
+                                               blockNums.remove(i);
+                                               i--;
+                                       }
+                               }
+                       }
+               }
                Bucket data = extract(block, token);
                if(data == null) return; // failed
                if(!block.isMetadata()) {


Reply via email to