Author: toad
Date: 2007-03-10 02:43:24 +0000 (Sat, 10 Mar 2007)
New Revision: 12085

Modified:
   trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
Log:
Hopefully fix ArrayIndexOutOfBoundsException

Modified: trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
===================================================================
--- trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java 
2007-03-10 02:36:24 UTC (rev 12084)
+++ trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java 
2007-03-10 02:43:24 UTC (rev 12085)
@@ -12,7 +12,6 @@
 import freenet.client.FailureCodeTracker;
 import freenet.client.FetchContext;
 import freenet.client.FetchException;
-import freenet.client.FetchResult;
 import freenet.client.Metadata;
 import freenet.client.MetadataParseException;
 import freenet.client.SplitfileBlock;
@@ -279,7 +278,7 @@
                logMINOR = Logger.shouldLog(Logger.MINOR, this);
                if(logMINOR) Logger.minor(this, "Permanently failed block: 
"+blockNo+" on "+this+" : "+e, e);
                synchronized(this) {
-                       if(isFinished()) return;
+                       if(isFinishing()) return; // this failure is now 
irrelevant, and cleanup will occur on the decoder thread
                        if(blockNo < dataKeys.length) {
                                if(dataKeys[blockNo] == null) {
                                        Logger.error(this, "Block already 
finished: "+blockNo);


Reply via email to