[freenet-cvs] r11922 - trunk/freenet/src/freenet/client/async

nextgens at freenetproject.org nextgens at freenetproject.org
Mon Feb 26 15:19:39 UTC 2007


Author: nextgens
Date: 2007-02-26 15:19:23 +0000 (Mon, 26 Feb 2007)
New Revision: 11922

Modified:
   trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
Log:
Fix saces' exception : http://code.bulix.org/hpp1o3-34541

There shouldn't be any action taken for canceled requests... We were ignoring successes but not errors.

Modified: trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
===================================================================
--- trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java	2007-02-25 20:48:40 UTC (rev 11921)
+++ trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java	2007-02-26 15:19:23 UTC (rev 11922)
@@ -275,6 +275,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(blockNo < dataKeys.length) {
 				if(dataKeys[blockNo] == null) {
 					Logger.error(this, "Block already finished: "+blockNo);
@@ -308,6 +309,7 @@
 		int tries;
 		int maxTries = blockFetchContext.maxNonSplitfileRetries;
 		synchronized(this) {
+			if(isFinished()) return;
 			if(blockNo < dataKeys.length) {
 				tries = ++dataRetries[blockNo];
 				if(tries > maxTries && maxTries >= 0) {




More information about the cvs mailing list