Author: dbkr
Date: 2006-03-02 22:48:36 +0000 (Thu, 02 Mar 2006)
New Revision: 8141

Modified:
   trunk/freenet/src/freenet/node/FNPPacketMangler.java
Log:
Don't update the DiffieHellmanContext if we're not actually going to send any 
handshakes, otherwise if we receive a handshake later, we'll reject it because 
we think one is in progress when in fact it's not.


Modified: trunk/freenet/src/freenet/node/FNPPacketMangler.java
===================================================================
--- trunk/freenet/src/freenet/node/FNPPacketMangler.java        2006-03-02 
17:16:14 UTC (rev 8140)
+++ trunk/freenet/src/freenet/node/FNPPacketMangler.java        2006-03-02 
22:48:36 UTC (rev 8141)
@@ -1275,7 +1275,7 @@
         Logger.minor(this, "Possibly sending handshake to "+pn);
         DiffieHellmanContext ctx;
         synchronized(pn) {
-            if(!pn.shouldSendHandshake()) {
+            if(!pn.shouldSendHandshake() || pn.getHandshakeIPs().length == 0) {
                 return;
             } else {
                 ctx = DiffieHellman.generateContext();


Reply via email to