Author: toad
Date: 2007-12-06 23:06:34 +0000 (Thu, 06 Dec 2007)
New Revision: 16379

Modified:
   trunk/freenet/src/freenet/node/Announcer.java
Log:
Disconnect after announcing. Explain a possible race condition.

Modified: trunk/freenet/src/freenet/node/Announcer.java
===================================================================
--- trunk/freenet/src/freenet/node/Announcer.java       2007-12-06 22:51:40 UTC 
(rev 16378)
+++ trunk/freenet/src/freenet/node/Announcer.java       2007-12-06 23:06:34 UTC 
(rev 16379)
@@ -297,6 +297,10 @@
                                                }, COOLING_OFF_PERIOD);
                                        }
                                }
+                               // If it takes more than COOLING_OFF_PERIOD to 
disconnect, we might not be able to reannounce to this
+                               // node. However, we can't reannounce to it 
anyway until announcedTo is cleared, which probably will
+                               // be more than that period in the future.
+                               node.peers.disconnect(seed, true, true);
                        }

                        public void nodeFailed(PeerNode pn, String reason) {


Reply via email to