mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-18 04:19:58 +00:00
reset peding time offset if correct time was received
This commit is contained in:
parent
b855c71891
commit
c5cab05a6b
@ -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,7 +1668,12 @@ 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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user