token expiration threshold

This commit is contained in:
orignal committed 2022-06-19 08:52:47 -04:00
1 parent dd602a27b5
commit 5bb20cb039
3 files changed
+15 -6

No files matched your search

+4
View File
@@ -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;
}