Author: toad
Date: 2008-12-09 22:48:49 +0000 (Tue, 09 Dec 2008)
New Revision: 24146

Modified:
   trunk/freenet/src/freenet/node/PeerNode.java
Log:
Fix dividing handshake time by the number of IPs when multi-homing (e.g. 
because allow local IPs is on, or there is both a domain and an IP). We were 
dividing the base delay by the number of IPs, but ignoring the result and going 
with the base delay.


Modified: trunk/freenet/src/freenet/node/PeerNode.java
===================================================================
--- trunk/freenet/src/freenet/node/PeerNode.java        2008-12-09 22:46:49 UTC 
(rev 24145)
+++ trunk/freenet/src/freenet/node/PeerNode.java        2008-12-09 22:48:49 UTC 
(rev 24146)
@@ -1373,10 +1373,10 @@
                } else {
                        delay = Node.MIN_TIME_BETWEEN_HANDSHAKE_SENDS + 
node.random.nextInt(Node.RANDOMIZED_TIME_BETWEEN_HANDSHAKE_SENDS);
                }
-               sendHandshakeTime = now + delay;
                // FIXME proper multi-homing support!
                delay /= (handshakeIPs == null ? 1 : handshakeIPs.length);
                if(delay < 3000) delay = 3000;
+               sendHandshakeTime = now + delay;
                
                if(successfulHandshakeSend)
                        firstHandshake = false;

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to