Author: dbkr
Date: 2006-05-01 22:20:02 +0000 (Mon, 01 May 2006)
New Revision: 8599

Modified:
   trunk/freenet/src/freenet/node/Node.java
   trunk/freenet/src/freenet/node/Version.java
Log:
669: Also set Java's DNS cache to 5 minutes, since it ignores TTL values (in 
relation to the dyndns lookups only happenning on startup bug)


Modified: trunk/freenet/src/freenet/node/Node.java
===================================================================
--- trunk/freenet/src/freenet/node/Node.java    2006-05-01 21:57:10 UTC (rev 
8598)
+++ trunk/freenet/src/freenet/node/Node.java    2006-05-01 22:20:02 UTC (rev 
8599)
@@ -453,7 +453,7 @@
     }

     /**
-     * Read the port number from the arguments.
+     * Read the config file from the arguments.
      * Then create a node.
      * Anything that needs static init should ideally be in here.
      */
@@ -469,6 +469,10 @@
                configFilename = new File("freenet.ini");
        } else
                configFilename = new File(args[0]);
+               
+       // set Java's DNS cache not to cache forever, since many people
+       // use dyndns hostnames
+       java.security.Security.setProperty("networkaddress.cache.ttl" , "300");

        FilePersistentConfig cfg = new FilePersistentConfig(configFilename);


Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2006-05-01 21:57:10 UTC (rev 
8598)
+++ trunk/freenet/src/freenet/node/Version.java 2006-05-01 22:20:02 UTC (rev 
8599)
@@ -20,7 +20,7 @@
        public static final String protocolVersion = "1.0";

        /** The build number of the current revision */
-       private static final int buildNumber = 668;
+       private static final int buildNumber = 669;

        /** Oldest build of Fred we will talk to */
        private static final int lastGoodBuild = 591;


Reply via email to