Author: toad
Date: 2007-12-08 14:23:13 +0000 (Sat, 08 Dec 2007)
New Revision: 16402
Modified:
trunk/freenet/src/freenet/node/Node.java
Log:
Cut handshake timeouts by 4% to ensure always within the 30 second assumed
minimum tunnel timeout.
Modified: trunk/freenet/src/freenet/node/Node.java
===================================================================
--- trunk/freenet/src/freenet/node/Node.java 2007-12-08 14:21:22 UTC (rev
16401)
+++ trunk/freenet/src/freenet/node/Node.java 2007-12-08 14:23:13 UTC (rev
16402)
@@ -215,7 +215,7 @@
// If no activity for 30 seconds, node is dead
public static final int MAX_PEER_INACTIVITY = 60000;
/** Time after which a handshake is assumed to have failed. */
- public static final int HANDSHAKE_TIMEOUT = 5000;
+ public static final int HANDSHAKE_TIMEOUT = 4800; // Keep the below
within the 30 second assumed timeout.
// Inter-handshake time must be at least 2x handshake timeout
public static final int MIN_TIME_BETWEEN_HANDSHAKE_SENDS =
HANDSHAKE_TIMEOUT*2; // 10-20 secs
public static final int RANDOMIZED_TIME_BETWEEN_HANDSHAKE_SENDS =
HANDSHAKE_TIMEOUT*2; // avoid overlap when the two handshakes are at the same
time