mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 12:28:42 +00:00
dht: keep bad nodes in searches
This commit is contained in:
1 parent
5de9bcfab0
commit
643dbc6268
1 file changed
-3
@@ -660,9 +660,6 @@ Dht::searchStep(Search& sr)
|
||||
{
|
||||
// Remove expired nodes
|
||||
DHT_WARN("Search IPv%c %s searchStep.", sr.af == AF_INET ? '4' : '6', sr.id.toString().c_str());
|
||||
sr.nodes.erase(std::remove_if (sr.nodes.begin(), sr.nodes.end(), [this](const SearchNode& n) {
|
||||
return n.node->isExpired(now) && n.node->time < now - NODE_GOOD_TIME;
|
||||
}), sr.nodes.end());
|
||||
|
||||
if (sr.nodes.empty()) {
|
||||
// No nodes... yet ?
|
||||
|
||||
Reference in new issue
Block a user