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

Skip to content
Snippets Groups Projects
Commit d84b1125 authored by zzz's avatar zzz
Browse files

* Timestamper: Don't start thread if not enabled

parent 8d4a1899
No related branches found
No related tags found
No related merge requests found
......@@ -52,6 +52,15 @@ public class Timestamper implements Runnable {
this(ctx, lsnr, true);
}
public Timestamper(I2PAppContext ctx, UpdateListener lsnr, boolean daemon) {
// Don't bother starting a thread if we are disabled.
// This means we no longer check every 5 minutes to see if we got enabled,
// so the property must be set at startup.
// We still need to be instantiated since the router calls clock().getTimestamper().waitForInitialization()
String disabled = ctx.getProperty(PROP_DISABLED, DEFAULT_DISABLED);
if (Boolean.valueOf(disabled).booleanValue()) {
_initialized = true;
return;
}
_context = ctx;
_daemon = daemon;
_initialized = false;
......
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