Author: toad
Date: 2008-08-13 12:08:56 +0000 (Wed, 13 Aug 2008)
New Revision: 21794

Modified:
   branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
Log:
Remove the blocks from the subsegments here (onFailure()), since they weren't 
removed by request selection.


Modified: 
branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSegment.java 
2008-08-13 12:07:53 UTC (rev 21793)
+++ branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSegment.java 
2008-08-13 12:08:56 UTC (rev 21794)
@@ -563,6 +563,7 @@
                }
                int maxTries = blockFetchContext.maxNonSplitfileRetries;
                RequestScheduler sched = context.getFetchScheduler(false);
+               seg.removeBlockNum(blockNo, container, false);
                SplitFileFetcherSubSegment sub = onNonFatalFailure(e, blockNo, 
seg, container, context, sched, maxTries);
                if(sub != null) {
                        sub.schedule(container, context, false, false);
@@ -576,8 +577,8 @@
                }
                int maxTries = blockFetchContext.maxNonSplitfileRetries;
                RequestScheduler sched = context.getFetchScheduler(false);
-               boolean set = false;
                HashSet<SplitFileFetcherSubSegment> toSchedule = null;
+               seg.removeBlockNums(blockNos, container);
                for(int i=0;i<failures.length;i++) {
                        SplitFileFetcherSubSegment sub = 
                                onNonFatalFailure(failures[i], blockNos[i], 
seg, container, context, sched, maxTries);


Reply via email to