forked from I2P_Developers/i2p.i2p
Limit wait for NTP to 45 seconds (ticket #1725)
This commit is contained in:
@@ -45,6 +45,7 @@ public class RouterTimestamper extends Timestamper {
|
|||||||
private static final int MAX_CONSECUTIVE_FAILS = 10;
|
private static final int MAX_CONSECUTIVE_FAILS = 10;
|
||||||
private static final int DEFAULT_TIMEOUT = 10*1000;
|
private static final int DEFAULT_TIMEOUT = 10*1000;
|
||||||
private static final int SHORT_TIMEOUT = 5*1000;
|
private static final int SHORT_TIMEOUT = 5*1000;
|
||||||
|
private static final long MAX_WAIT_INITIALIZATION = 45*1000;
|
||||||
|
|
||||||
public static final String PROP_QUERY_FREQUENCY = "time.queryFrequencyMs";
|
public static final String PROP_QUERY_FREQUENCY = "time.queryFrequencyMs";
|
||||||
public static final String PROP_SERVER_LIST = "time.sntpServerList";
|
public static final String PROP_SERVER_LIST = "time.sntpServerList";
|
||||||
@@ -141,7 +142,7 @@ public class RouterTimestamper extends Timestamper {
|
|||||||
try {
|
try {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
if (!_initialized)
|
if (!_initialized)
|
||||||
wait();
|
wait(MAX_WAIT_INITIALIZATION);
|
||||||
}
|
}
|
||||||
} catch (InterruptedException ie) {}
|
} catch (InterruptedException ie) {}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user