mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
don't detach ECIESx25519 session from destination
This commit is contained in:
parent
bc4a97774f
commit
b1262d54de
6 changed files with 29 additions and 14 deletions
|
@ -445,9 +445,16 @@ namespace garlic
|
|||
|
||||
void GarlicDestination::CleanUp ()
|
||||
{
|
||||
for (auto it: m_Sessions)
|
||||
it.second->SetOwner (nullptr);
|
||||
m_Sessions.clear ();
|
||||
m_DeliveryStatusSessions.clear ();
|
||||
m_Tags.clear ();
|
||||
for (auto it: m_ECIESx25519Sessions)
|
||||
{
|
||||
it.second->Terminate ();
|
||||
it.second->SetOwner (nullptr);
|
||||
}
|
||||
m_ECIESx25519Sessions.clear ();
|
||||
m_ECIESx25519Tags.clear ();
|
||||
}
|
||||
|
@ -852,7 +859,7 @@ namespace garlic
|
|||
{
|
||||
if (it->second->CheckExpired (ts))
|
||||
{
|
||||
it->second->SetOwner (nullptr);
|
||||
it->second->Terminate ();
|
||||
it = m_ECIESx25519Sessions.erase (it);
|
||||
}
|
||||
else
|
||||
|
@ -1077,7 +1084,7 @@ namespace garlic
|
|||
{
|
||||
if (it->second->CanBeRestarted (i2p::util::GetSecondsSinceEpoch ()))
|
||||
{
|
||||
it->second->SetOwner (nullptr); // detach
|
||||
it->second->Terminate (); // detach
|
||||
m_ECIESx25519Sessions.erase (it);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue