Author: zothar
Date: 2006-06-02 12:46:17 +0000 (Fri, 02 Jun 2006)
New Revision: 8983
Modified:
trunk/freenet/src/freenet/node/DNSRequester.java
trunk/freenet/src/freenet/node/PeerNode.java
Log:
The firstCycle concept in DNSRequest was replaced with the more elegant call to
maybeUpdateHandshakeIPs(true) at PeerNode creation, thus we update handshakeIPs
with the IP information we may have from the ref or the stored physical.udp
metadata. handshakeIPs is what's used by the handshake code and handshaking
can't happen until handshakeIPs is populated.
Modified: trunk/freenet/src/freenet/node/DNSRequester.java
===================================================================
--- trunk/freenet/src/freenet/node/DNSRequester.java 2006-06-02 12:24:07 UTC
(rev 8982)
+++ trunk/freenet/src/freenet/node/DNSRequester.java 2006-06-02 12:46:17 UTC
(rev 8983)
@@ -12,7 +12,6 @@
final Thread myThread;
final Node node;
private long lastLogTime = 0;
- private boolean firstCycle = true;
DNSRequester(Node node) {
this.node = node;
@@ -61,10 +60,9 @@
if(!pn.isConnected()) {
// Not connected
// Try new DNS lookup
- pn.maybeUpdateHandshakeIPs(firstCycle);
+ pn.maybeUpdateHandshakeIPs(false);
}
}
- firstCycle = false;
try {
synchronized(this) {
wait(200); // sleep 200ms
Modified: trunk/freenet/src/freenet/node/PeerNode.java
===================================================================
--- trunk/freenet/src/freenet/node/PeerNode.java 2006-06-02 12:24:07 UTC
(rev 8982)
+++ trunk/freenet/src/freenet/node/PeerNode.java 2006-06-02 12:46:17 UTC
(rev 8983)
@@ -404,7 +404,8 @@
}
}
-
+ // populate handshakeIPs so handshakes can start ASAP
+ maybeUpdateHandshakeIPs(true);
}
private boolean parseARK(SimpleFieldSet fs) {