mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-22 00:59:08 +01:00
reset peding time offset if correct time was received
This commit is contained in:
parent
b855c71891
commit
c5cab05a6b
1 changed files with 6 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2022-2023, The PurpleI2P Project
|
||||
* Copyright (c) 2022-2024, The PurpleI2P Project
|
||||
*
|
||||
* This file is part of Purple i2pd project and licensed under BSD3
|
||||
*
|
||||
|
@ -1668,8 +1668,13 @@ namespace transport
|
|||
if (m_Server.IsSyncClockFromPeers ())
|
||||
{
|
||||
if (std::abs (offset) > SSU2_CLOCK_THRESHOLD)
|
||||
{
|
||||
LogPrint (eLogWarning, "SSU2: Time offset ", offset, " from ", m_RemoteEndpoint);
|
||||
m_Server.AdjustTimeOffset (-offset);
|
||||
}
|
||||
else
|
||||
m_Server.AdjustTimeOffset (0);
|
||||
}
|
||||
else if (std::abs (offset) > SSU2_CLOCK_SKEW)
|
||||
{
|
||||
LogPrint (eLogError, "SSU2: Clock skew detected ", offset, ". Check your clock");
|
||||
|
|
Loading…
Add table
Reference in a new issue