From 42f70cd55dacc08fc3e8ca03ca5dc78cf7f01c6b Mon Sep 17 00:00:00 2001 From: orignal Date: Mon, 5 Dec 2016 15:45:04 -0500 Subject: [PATCH] request destination after frist lookup --- NetDb.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/NetDb.cpp b/NetDb.cpp index e75cf217..dc745bbc 100644 --- a/NetDb.cpp +++ b/NetDb.cpp @@ -882,7 +882,11 @@ namespace data } closestFloodfills = GetClosestFloodfills (ident, 3, excludedRouters, true); if (!numExcluded) // save if no excluded + { m_LookupResponses[ident] = std::make_pair(closestFloodfills, i2p::util::GetSecondsSinceEpoch ()); + if (lookupType != DATABASE_LOOKUP_TYPE_EXPLORATORY_LOOKUP) + RequestDestination (ident); // try to request for first time only + } } replyMsg = CreateDatabaseSearchReply (ident, closestFloodfills); } @@ -1197,7 +1201,7 @@ namespace data auto ts = i2p::util::GetSecondsSinceEpoch (); for (auto it = m_LookupResponses.begin (); it != m_LookupResponses.end ();) { - if (ts > it->second.second + 180) // 3 minutes + if (ts > it->second.second + 120) // 2 minutes it = m_LookupResponses.erase (it); else ++it;