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

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

* Clock: Don't refuse to update because of peer skew the first time

parent 977d39ae
No related branches found
No related tags found
No related merge requests found
...@@ -29,8 +29,6 @@ public class RouterClock extends Clock { ...@@ -29,8 +29,6 @@ public class RouterClock extends Clock {
*/ */
@Override @Override
public void setOffset(long offsetMs, boolean force) { public void setOffset(long offsetMs, boolean force) {
if (false) return;
long delta = offsetMs - _offset; long delta = offsetMs - _offset;
if (!force) { if (!force) {
if ((offsetMs > MAX_OFFSET) || (offsetMs < 0 - MAX_OFFSET)) { if ((offsetMs > MAX_OFFSET) || (offsetMs < 0 - MAX_OFFSET)) {
...@@ -54,7 +52,8 @@ public class RouterClock extends Clock { ...@@ -54,7 +52,8 @@ public class RouterClock extends Clock {
} }
// If so configured, check sanity of proposed clock offset // If so configured, check sanity of proposed clock offset
if (Boolean.valueOf(_contextRC.getProperty("router.clockOffsetSanityCheck","true")).booleanValue() == true) { if (Boolean.valueOf(_contextRC.getProperty("router.clockOffsetSanityCheck","true")).booleanValue() &&
_alreadyChanged) {
// Try calculating peer clock skew // Try calculating peer clock skew
Long peerClockSkew = _contextRC.commSystem().getFramedAveragePeerClockSkew(50); Long peerClockSkew = _contextRC.commSystem().getFramedAveragePeerClockSkew(50);
......
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