mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-06-07 17:32:19 +00:00
close all session and regenerate static keys for new dest
This commit is contained in:
@@ -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 ();
|
||||
|
||||
Reference in New Issue
Block a user