mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
token expiration threshold
This commit is contained in:
parent
dd602a27b5
commit
5bb20cb039
3 changed files with 15 additions and 6 deletions
|
@ -588,7 +588,11 @@ namespace transport
|
|||
{
|
||||
auto it = m_OutgoingTokens.find (ep);
|
||||
if (it != m_OutgoingTokens.end ())
|
||||
{
|
||||
if (i2p::util::GetSecondsSinceEpoch () + SSU2_TOKEN_EXPIRATION_THRESHOLD > it->second.second)
|
||||
return 0; // token expired
|
||||
return it->second.first;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue