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

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

improved locking

parent 1caf3e77
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,7 @@ public class RouterTimestamper extends Timestamper {
private int _consecutiveFails;
private volatile boolean _disabled;
private final boolean _daemon;
private boolean _initialized;
private volatile boolean _initialized;
private boolean _wellSynced;
private volatile boolean _isRunning;
private Thread _timestamperThread;
......@@ -199,10 +199,13 @@ public class RouterTimestamper extends Timestamper {
}
}
boolean wasInitialized = _initialized;
if (!wasInitialized)
_initialized = true;
synchronized (this) { notifyAll(); }
boolean wasInitialized;
synchronized (this) {
wasInitialized = _initialized;
if (!wasInitialized)
_initialized = true;
notifyAll();
}
if (!wasInitialized) {
// let the log manager get initialized
try { Thread.sleep(10*1000); } catch (InterruptedException ie) {}
......
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