Skip to content
Snippets Groups Projects
Commit b0536d9e authored by Adrien Béraud's avatar Adrien Béraud
Browse files

search: expire only after candidate expiration

parent 60a4f369
No related branches found
No related tags found
No related merge requests found
...@@ -616,7 +616,7 @@ struct Dht::Search { ...@@ -616,7 +616,7 @@ struct Dht::Search {
unsigned getNumberOfConsecutiveBadNodes() const { unsigned getNumberOfConsecutiveBadNodes() const {
unsigned count = 0; unsigned count = 0;
std::find_if(nodes.begin(), nodes.end(), [&count](const std::unique_ptr<SearchNode>& sn) { std::find_if(nodes.begin(), nodes.end(), [&count](const std::unique_ptr<SearchNode>& sn) {
if (not sn->isBad()) if (not sn->node->isExpired())
return true; return true;
++count; ++count;
return false; return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment