forked from I2P_Developers/i2p.i2p
NTCP: Log source of clock adjustment at startup
This commit is contained in:
@@ -211,7 +211,8 @@ class InboundEstablishState extends EstablishBase implements NTCP2Payload.Payloa
|
||||
_context.clock().setOffset(1000 * (0 - _peerSkew), true);
|
||||
_peerSkew = 0;
|
||||
if (diff != 0)
|
||||
_log.logAlways(Log.WARN, "NTP failure, NTCP adjusting clock by " + DataHelper.formatDuration(diff));
|
||||
_log.logAlways(Log.WARN, "NTP failure, NTCP adjusting clock by " + DataHelper.formatDuration(diff) +
|
||||
" source router: " + aliceHash);
|
||||
} else if (diff >= Router.CLOCK_FUDGE_FACTOR) {
|
||||
// Only banlist if we know what time it is
|
||||
_context.banlist().banlistRouter(DataHelper.formatDuration(diff),
|
||||
|
||||
@@ -319,7 +319,8 @@ class OutboundNTCP2State implements EstablishState {
|
||||
// We are Alice, he is Bob, adjust to match Bob
|
||||
_context.clock().setOffset(1000 * (0 - _peerSkew), true);
|
||||
_peerSkew = 0;
|
||||
_log.logAlways(Log.WARN, "NTP failure, NTCP adjusting clock by " + DataHelper.formatDuration(diff));
|
||||
_log.logAlways(Log.WARN, "NTP failure, NTCP adjusting clock by " + DataHelper.formatDuration(diff) +
|
||||
" source router: " + _con.getRemotePeer().calculateHash());
|
||||
}
|
||||
changeState(State.OB_GOT_HXY);
|
||||
_received = 0;
|
||||
|
||||
Reference in New Issue
Block a user