Author: zothar
Date: 2006-06-09 14:27:41 +0000 (Fri, 09 Jun 2006)
New Revision: 9097
Modified:
trunk/freenet/src/freenet/node/PeerNode.java
Log:
Possibly start an ARKFetcher even if the handshakeCount is past the maximum
(since we may have been limited from starting at the max).
Modified: trunk/freenet/src/freenet/node/PeerNode.java
===================================================================
--- trunk/freenet/src/freenet/node/PeerNode.java 2006-06-09 14:20:38 UTC
(rev 9096)
+++ trunk/freenet/src/freenet/node/PeerNode.java 2006-06-09 14:27:41 UTC
(rev 9097)
@@ -838,7 +838,7 @@
+
node.random.nextInt(Node.RANDOMIZED_TIME_BETWEEN_VERSION_PROBES);
} else {
sendHandshakeTime = now + Node.MIN_TIME_BETWEEN_HANDSHAKE_SENDS
- +
node.random.nextInt(Node.RANDOMIZED_TIME_BETWEEN_HANDSHAKE_SENDS);
+ +
node.random.nextInt(Node.RANDOMIZED_TIME_BETWEEN_HANDSHAKE_SENDS);
}
firstHandshake = false;
this.handshakeCount++;
@@ -884,7 +884,7 @@
this.handshakeCount++;
}
// Don't fetch ARKs for peers we have verified (through handshake) to
be incompatible with us
- if(handshakeCount == MAX_HANDSHAKE_COUNT &&
!(verifiedIncompatibleOlderVersion || verifiedIncompatibleNewerVersion)) {
+ if(handshakeCount >= MAX_HANDSHAKE_COUNT &&
!(verifiedIncompatibleOlderVersion || verifiedIncompatibleNewerVersion)) {
int numARKFetchers = node.getNumARKFetchers();
if( numARKFetchers >= 30 ) { // Limit concurrent ARK Fetch
Requests to 30 since we UserAlert at 20 disconnected peers anyway
Logger.minor( this, "Not starting ARK Fetcher
after "+handshakeCount+" failed handshakes for "+getPeer()+" with identity
'"+getIdentityString()+"' because there are already 30 ARK Fetchers running.");