Author: toad
Date: 2008-01-18 15:54:31 +0000 (Fri, 18 Jan 2008)
New Revision: 17149

Modified:
   trunk/freenet/src/freenet/node/Announcer.java
Log:
Don't tell the user we are announcing until we actually start announcing.

Modified: trunk/freenet/src/freenet/node/Announcer.java
===================================================================
--- trunk/freenet/src/freenet/node/Announcer.java       2008-01-18 15:52:27 UTC 
(rev 17148)
+++ trunk/freenet/src/freenet/node/Announcer.java       2008-01-18 15:54:31 UTC 
(rev 17149)
@@ -261,9 +261,10 @@
        static final int FINAL_DELAY = 60*1000;
        /** But if we don't have enough peers at that point, wait another 
minute and if the situation has not improved, reannounce. */
        static final int RETRY_DELAY = 60*1000;
+       private boolean started = false;

-       
        public void maybeSendAnnouncement() {
+               started = true;
                logMINOR = Logger.shouldLog(Logger.MINOR, this);
                if(logMINOR)
                        Logger.minor(this, "maybeSendAnnouncement()");
@@ -532,7 +533,7 @@
                }

                public boolean isValid() {
-                       return !enoughPeers();
+                       return started && !enoughPeers();
                }

                public void isValid(boolean validity) {


Reply via email to