Fix the race condition bug Jed reported. A time jump on startup could cause

an apparently overly-long (or even negative) ledger interval. The fix is to
start up time synch earlier and to tolerate slight negative ledger intervals.
This commit is contained in:
JoelKatz
2012-08-08 14:22:03 -07:00
parent 28bddfb538
commit be17a3866f
4 changed files with 13 additions and 11 deletions

View File

@@ -166,7 +166,9 @@ void SNTPClient::processReply()
if ((mOffset == -1) || (mOffset == 1)) // small corrections likely do more harm than good
mOffset = 0;
#ifndef SNTP_DEBUG
if (timev || mOffset)
#endif
Log(lsTRACE) << "SNTP: Offset is " << timev << ", new system offset is " << mOffset;
}