Author: robert
Date: 2008-01-07 17:49:37 +0000 (Mon, 07 Jan 2008)
New Revision: 16956
Modified:
trunk/freenet/src/freenet/node/RequestHandler.java
trunk/freenet/src/freenet/node/RequestSender.java
Log:
revert 16905 and add comment
Modified: trunk/freenet/src/freenet/node/RequestHandler.java
===================================================================
--- trunk/freenet/src/freenet/node/RequestHandler.java 2008-01-07 12:36:46 UTC
(rev 16955)
+++ trunk/freenet/src/freenet/node/RequestHandler.java 2008-01-07 17:49:37 UTC
(rev 16956)
@@ -154,6 +154,7 @@
waitStatus = rs.waitUntilStatusChange(waitStatus);
if((waitStatus & RequestSender.WAIT_REJECTED_OVERLOAD) != 0) {
// Forward RejectedOverload
+ //Note: This message is only decernable from
the terminal messages by the IS_LOCAL flag being false. (!IS_LOCAL)->!Terminal
Message msg = DMT.createFNPRejectedOverload(uid, false);
source.sendAsync(msg, null, 0, this);
}
Modified: trunk/freenet/src/freenet/node/RequestSender.java
===================================================================
--- trunk/freenet/src/freenet/node/RequestSender.java 2008-01-07 12:36:46 UTC
(rev 16955)
+++ trunk/freenet/src/freenet/node/RequestSender.java 2008-01-07 17:49:37 UTC
(rev 16956)
@@ -396,20 +396,17 @@
if(msg.getSpec() == DMT.FNPRejectedOverload) {
// Non-fatal - probably still have time
left
forwardRejectedOverload();
+ rejectOverloads++;
if (msg.getBoolean(DMT.IS_LOCAL)) {
+ //NB: IS_LOCAL means it's
terminal. not(IS_LOCAL) implies that the rejection message was forwarded from a
downstream node.
+ //"Local" from our peers
perspective, this has nothing to do with local requests (source==null)
next.localRejectedOverload("ForwardRejectedOverload2");
if(logMINOR) Logger.minor(this,
"Local RejectedOverload, moving on to next peer");
// Give up on this one, try
another
break;
}
- /*
- This happens OFTEN!
- There is a very small chance that this
is a previous reject from before the ACCEPTED,
- but (having more-or-less flushed those
while waiting on the accepted), it will effectively
- always be one of the standard reject
replies (See RequestHandler).
- */
- rejectOverloads++;
- break; // Don't wait for any further
response, next peer
+ //so long as the node does not send a
(IS_LOCAL) message. Interestingly messages can often timeout having only
received this message.
+ continue;
}
if(msg.getSpec() == DMT.FNPCHKDataFound) {