From 461dfb29f3ff7e5ab7b53a33646c24efaaa9064b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= Date: Tue, 1 Sep 2015 18:10:30 +0200 Subject: [PATCH] dht: expire search with only candidates --- src/dht.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dht.cpp b/src/dht.cpp index c5fe65fe..0712ec39 100644 --- a/src/dht.cpp +++ b/src/dht.cpp @@ -970,7 +970,7 @@ Dht::searchStep(Search& sr) if (i > 0) sr.get_step_time = now; else if ((size_t)std::count_if(sr.nodes.begin(), sr.nodes.end(), [&](const SearchNode& sn) { - return sn.node->isExpired(now); + return sn.candidate or sn.node->isExpired(now); }) == sr.nodes.size()) { DHT_ERROR("[search %s IPv%c] expired", sr.id.toString().c_str(), sr.af == AF_INET ? '4' : '6');