Author: toad
Date: 2008-03-25 13:30:16 +0000 (Tue, 25 Mar 2008)
New Revision: 18775
Modified:
trunk/freenet/src/freenet/node/LocationManager.java
Log:
Convert a SwapReply to a SwapRejected in this case.
Modified: trunk/freenet/src/freenet/node/LocationManager.java
===================================================================
--- trunk/freenet/src/freenet/node/LocationManager.java 2008-03-25 13:23:41 UTC
(rev 18774)
+++ trunk/freenet/src/freenet/node/LocationManager.java 2008-03-25 13:30:16 UTC
(rev 18775)
@@ -987,6 +987,13 @@
return true;
}
if(item.bootID != item.routedTo.getBootID()) {
+ // Race condition, the node rebooted just after sending the
reply.
+ Message msg = DMT.createFNPSwapRejected(uid);
+ try {
+ item.requestSender.sendAsync(msg, null, 0, this);
+ } catch (NotConnectedException e) {
+ if(logMINOR) Logger.minor(this, "Lost connection forwarding
SwapReply converted to SwapRejected: "+uid+" to "+item.requestSender);
+ }
Logger.normal(this, "Dropping SwapReply as boot ID has changed
for "+source);
return true; // Valid but not forwarded
}