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