Author: toad
Date: 2009-01-16 22:03:33 +0000 (Fri, 16 Jan 2009)
New Revision: 25096

Modified:
   trunk/freenet/src/freenet/node/RequestSender.java
Log:
If the transfer fails, treat it the same whether it was turtled or not - 
backoff if it was a timeout, add to failure table if it was a quick 
cancellation.


Modified: trunk/freenet/src/freenet/node/RequestSender.java
===================================================================
--- trunk/freenet/src/freenet/node/RequestSender.java   2009-01-16 21:54:08 UTC 
(rev 25095)
+++ trunk/freenet/src/freenet/node/RequestSender.java   2009-01-16 22:03:33 UTC 
(rev 25096)
@@ -865,17 +865,16 @@
                                        boolean timeout = (!br.senderAborted()) 
&&
                                                        (reason == 
RetrievalException.SENDER_DIED || reason == RetrievalException.RECEIVER_DIED || 
reason == RetrievalException.TIMED_OUT
                                                        || reason == 
RetrievalException.UNABLE_TO_SEND_BLOCK_WITHIN_TIMEOUT);
-                                       if(!turtle) {
-                                               if(timeout) {
-                                                       // Looks like a 
timeout. Backoff.
-                                                       
next.transferFailed(e.getMessage());
-                                               } else {
-                                                       // Quick failure (in 
that we didn't have to timeout). Don't backoff.
-                                                       // Treat as a DNF.
-                                                       
node.failureTable.onFinalFailure(key, next, htl, FailureTable.REJECT_TIME, 
source);
-                                               }
-                                       node.nodeStats.failedBlockReceive(true, 
timeout, reason == RetrievalException.GONE_TO_TURTLE_MODE);
-                                       }
+                                               if(timeout) {
+                                                       // Looks like a 
timeout. Backoff, even if it's a turtle.
+                                                       
next.transferFailed(e.getMessage());
+                                               } else {
+                                                       // Quick failure (in 
that we didn't have to timeout). Don't backoff.
+                                                       // Treat as a DNF.
+                                                       // If it was turtled, 
and then failed, still treat it as a DNF.
+                                                       
node.failureTable.onFinalFailure(key, next, htl, FailureTable.REJECT_TIME, 
source);
+                                               }
+                                       node.nodeStats.failedBlockReceive(true, 
timeout, reason == RetrievalException.GONE_TO_TURTLE_MODE);
                                        return;
                                }
                        } finally {

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

Reply via email to