don't include old tunnel to LeaseSet if recreated

This commit is contained in:
orignal 2021-09-10 19:57:38 -04:00
parent ad036de69d
commit 5e2e1a1e3d
3 changed files with 19 additions and 6 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2020, The PurpleI2P Project
* Copyright (c) 2013-2021, The PurpleI2P Project
*
* This file is part of Purple i2pd project and licensed under BSD3
*
@ -692,7 +692,7 @@ namespace tunnel
// let it die if the tunnel pool has been reconfigured and this is old
if (pool && tunnel->GetNumHops() == pool->GetNumOutboundHops())
{
tunnel->SetIsRecreated ();
tunnel->SetRecreated (true);
pool->RecreateOutboundTunnel (tunnel);
}
}
@ -746,7 +746,7 @@ namespace tunnel
// let it die if the tunnel pool was reconfigured and has different number of hops
if (pool && tunnel->GetNumHops() == pool->GetNumInboundHops())
{
tunnel->SetIsRecreated ();
tunnel->SetRecreated (true);
pool->RecreateInboundTunnel (tunnel);
}
}