I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit a2b86acc authored by jrandom's avatar jrandom Committed by zzz
Browse files

clear up a race where the timestamper might be fired when it shouldnt be

parent 8e53028d
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,7 @@ public class Timestamper implements Runnable {
private List _servers;
private List _listeners;
private int _queryFrequency;
private boolean _disabled;
private volatile boolean _disabled;
private boolean _daemon;
private static final int DEFAULT_QUERY_FREQUENCY = 5*60*1000;
......@@ -102,6 +102,7 @@ public class Timestamper implements Runnable {
_log.info("Starting up timestamper");
try {
while (true) {
updateConfig();
if (!_disabled) {
String serverList[] = null;
synchronized (_servers) {
......@@ -120,7 +121,6 @@ public class Timestamper implements Runnable {
_log.log(Log.CRIT, "Unable to reach any of the NTP servers - network disconnected?");
}
}
updateConfig();
try { Thread.sleep(_queryFrequency); } catch (InterruptedException ie) {}
}
} catch (Throwable t) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment