Author: toad
Date: 2007-07-27 14:03:57 +0000 (Fri, 27 Jul 2007)
New Revision: 14378
Modified:
trunk/freenet/src/freenet/node/PacketSender.java
trunk/freenet/src/freenet/node/PeerNode.java
Log:
shouldDisconnectNow -> noLongerRoutable (more accurate name)
Modified: trunk/freenet/src/freenet/node/PacketSender.java
===================================================================
--- trunk/freenet/src/freenet/node/PacketSender.java 2007-07-27 13:49:57 UTC
(rev 14377)
+++ trunk/freenet/src/freenet/node/PacketSender.java 2007-07-27 14:03:57 UTC
(rev 14378)
@@ -183,7 +183,7 @@
pn.maybeOnConnect();
if(pn.isConnected()) {
- if(pn.isRoutable() && pn.shouldDisconnectNow()) {
+ if(pn.isRoutable() && pn.noLongerRoutable()) {
// we don't disconnect but we mark it incompatible
pn.invalidate();
pn.setPeerNodeStatus(now);
Modified: trunk/freenet/src/freenet/node/PeerNode.java
===================================================================
--- trunk/freenet/src/freenet/node/PeerNode.java 2007-07-27 13:49:57 UTC
(rev 14377)
+++ trunk/freenet/src/freenet/node/PeerNode.java 2007-07-27 14:03:57 UTC
(rev 14378)
@@ -2175,7 +2175,7 @@
if(logMINOR) Logger.minor(this, "Reporting ping time to
"+this+" : "+(now - startTime));
}
- if(shouldDisconnectNow()){
+ if(noLongerRoutable()){
invalidate();
setPeerNodeStatus(now);
}
@@ -2451,10 +2451,10 @@
}
/**
- * Should the node be disconnected from immediately?
+ * Has the node gone from being routable to being non-routable?
* This will return true if our lastGoodBuild has changed due to a
timed mandatory.
*/
- public synchronized boolean shouldDisconnectNow() {
+ public synchronized boolean noLongerRoutable() {
// TODO: We should disconnect here if "protocol version
mismatch", maybe throwing an exception
// TODO: shouldDisconnectNow() is hopefully only called when
we're connected, otherwise we're breaking the meaning of
verifiedIncompable[Older|Newer]Version
if(verifiedIncompatibleNewerVersion ||
verifiedIncompatibleOlderVersion) return true;