Browse Source

select few introducers at the time

pull/1656/head
orignal 4 years ago
parent
commit
9c8c3b9174
  1. 5
      libi2pd/SSU.cpp

5
libi2pd/SSU.cpp

@ -676,11 +676,10 @@ namespace transport @@ -676,11 +676,10 @@ namespace transport
{
auto session = v4 ? GetRandomV4Session (filter) : GetRandomV6Session (filter);
if (session)
{
ret.insert (session.get ());
else
break;
}
}
return ret;
}
@ -771,7 +770,7 @@ namespace transport @@ -771,7 +770,7 @@ namespace transport
if (numIntroducers < SSU_MAX_NUM_INTRODUCERS)
{
// create new
auto sessions = FindIntroducers (SSU_MAX_NUM_INTRODUCERS, v4);
auto sessions = FindIntroducers (SSU_MAX_NUM_INTRODUCERS - numIntroducers, v4);
for (const auto& it1: sessions)
{
const auto& ep = it1->GetRemoteEndpoint ();

Loading…
Cancel
Save