From 9c8c3b91747f8f557db8011005b1f4c07e2c2fc4 Mon Sep 17 00:00:00 2001 From: orignal Date: Wed, 21 Apr 2021 10:56:39 -0400 Subject: [PATCH] select few introducers at the time --- libi2pd/SSU.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libi2pd/SSU.cpp b/libi2pd/SSU.cpp index fb7b7da1..578c09eb 100644 --- a/libi2pd/SSU.cpp +++ b/libi2pd/SSU.cpp @@ -676,10 +676,9 @@ 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 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 ();