allow session restart after 2 minutes from creation

This commit is contained in:
orignal 2020-05-23 10:20:22 -04:00
parent ead89c767a
commit 86e8614934
2 changed files with 5 additions and 3 deletions

View file

@ -467,7 +467,8 @@ namespace garlic
return false;
}
m_State = eSessionStateNewSessionReplySent;
m_SessionCreatedTimestamp = i2p::util::GetSecondsSinceEpoch ();
return true;
}
@ -559,6 +560,7 @@ namespace garlic
if (m_State == eSessionStateNewSessionSent)
{
m_State = eSessionStateEstablished;
m_SessionCreatedTimestamp = i2p::util::GetSecondsSinceEpoch ();
GetOwner ()->AddECIESx25519Session (m_RemoteStaticKey, shared_from_this ());
}
memcpy (m_H, h, 32); // restore m_H