Author: toad
Date: 2008-12-17 19:34:10 +0000 (Wed, 17 Dec 2008)
New Revision: 24464

Modified:
   
branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java
Log:
Don't remove the block until after we have attempted the request.


Modified: 
branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java
===================================================================
--- 
branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java  
    2008-12-17 19:31:54 UTC (rev 24463)
+++ 
branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java  
    2008-12-17 19:34:10 UTC (rev 24464)
@@ -170,7 +170,7 @@
                                int x;
                                if(blockNums.size() == 0) return null;
                                x = context.random.nextInt(blockNums.size());
-                               ret = blockNums.remove(x);
+                               ret = blockNums.get(x);
                                int num = ret;
                                Key key = segment.getBlockNodeKey(ret, 
container);
                                if(key == null) {
@@ -182,13 +182,10 @@
                                        continue;
                                }
                                if(keys.hasKey(key)) {
-                                       blockNums.add(ret);
                                        continue;
                                }
                                if(logMINOR)
                                        Logger.minor(this, "Removing block 
"+x+" of "+(blockNums.size()+1)+ " : "+ret+ " on "+this);
-                               if(persistent)
-                                       container.store(blockNums);
                                return ret;
                        }
                        return null;

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

Reply via email to