close all session and regenerate static keys for new dest

This commit is contained in:
orignal
2026-04-08 14:50:15 -04:00
parent cc3d610592
commit ae3de9ef46
3 changed files with 18 additions and 6 deletions
-5
View File
@@ -84,14 +84,9 @@ namespace client
auto ident = m_LocalDestination->GetPrivateKeys ().GetPublic ();
if (ident)
{
auto streamingDest = m_LocalDestination->GetStreamingDestination ();
if (streamingDest) streamingDest->Stop ();
auto pool = m_LocalDestination->GetTunnelPool ();
if (pool) pool->DetachTunnels ();
m_LocalDestination->SetPrivateKeys (i2p::data::PrivateKeys::CreateRandomKeys (
ident->GetSigningKeyType (), ident->GetCryptoKeyType (), true));
i2p::client::context.ReplaceLocalDestinationHash (ident->GetIdentHash (), m_LocalDestination->GetIdentHash ());
if (streamingDest) streamingDest->Start ();
}
}
ScheduleIdleCheckTimer ();