mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
cleanup introducers at startup
This commit is contained in:
@@ -116,6 +116,10 @@ namespace i2p
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// delete previous introducers
|
||||||
|
for (auto& addr : addresses)
|
||||||
|
addr.introducers.clear ();
|
||||||
|
|
||||||
// update
|
// update
|
||||||
UpdateRouterInfo ();
|
UpdateRouterInfo ();
|
||||||
}
|
}
|
||||||
|
|||||||
4
SSU.cpp
4
SSU.cpp
@@ -1170,10 +1170,10 @@ namespace ssu
|
|||||||
i2p::context.RemoveIntroducer (it);
|
i2p::context.RemoveIntroducer (it);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!numIntroducers)
|
if (numIntroducers < SSU_MAX_NUM_INTRODUCERS)
|
||||||
{
|
{
|
||||||
// create new
|
// create new
|
||||||
auto introducers = FindIntroducers (SSU_MAX_NUM_INTRODUCERS);
|
auto introducers = FindIntroducers (SSU_MAX_NUM_INTRODUCERS - numIntroducers);
|
||||||
if (introducers.size () > 0)
|
if (introducers.size () > 0)
|
||||||
{
|
{
|
||||||
for (auto it1: introducers)
|
for (auto it1: introducers)
|
||||||
|
|||||||
Reference in New Issue
Block a user