mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
dht: expire search with only candidates
This commit is contained in:
1 parent
6e6882ca7a
commit
461dfb29f3
1 file changed
+1
-1
+1
-1
@@ -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');
|
||||
|
||||
Reference in new issue
Block a user