diff --git a/router/java/src/net/i2p/router/tasks/ReadConfigJob.java b/router/java/src/net/i2p/router/tasks/ReadConfigJob.java index 42391702a2f5d21ea01b8b0a21a97645b38a233c..8883957b6b6458736508c7b14875d602239149e8 100644 --- a/router/java/src/net/i2p/router/tasks/ReadConfigJob.java +++ b/router/java/src/net/i2p/router/tasks/ReadConfigJob.java @@ -24,11 +24,12 @@ import net.i2p.util.Log; * Unfortunately it will also read the file back in every time the * router writes it. * - * So maybe this should just be disabled. + * We must keep this enabled, as it's the only way for people + * to set routerconsole.advanced=true without restarting. */ public class ReadConfigJob extends JobImpl { private final static long DELAY = 30*1000; // reread every 30 seconds - private long _lastRead; + private volatile long _lastRead; public ReadConfigJob(RouterContext ctx) { super(ctx); @@ -50,10 +51,8 @@ public class ReadConfigJob extends JobImpl { } private boolean shouldReread(File configFile) { - if (!configFile.exists()) return false; - if (configFile.lastModified() > _lastRead) - return true; - else - return false; + // lastModified() returns 0 if not found + //if (!configFile.exists()) return false; + return configFile.lastModified() > _lastRead; } }