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

dht: don't count bad nodes in get request count

parent faf5c378
No related branches found
No related tags found
No related merge requests found
...@@ -270,7 +270,7 @@ struct Dht::Search { ...@@ -270,7 +270,7 @@ struct Dht::Search {
unsigned currentGetRequests() const { unsigned currentGetRequests() const {
unsigned count = 0; unsigned count = 0;
for (const auto& n : nodes) for (const auto& n : nodes)
if (n.getStatus and n.getStatus->pending()) if (not n.isBad() and n.getStatus and n.getStatus->pending())
count++; count++;
return count; return count;
} }
...@@ -887,6 +887,8 @@ Dht::searchStep(std::shared_ptr<Search> sr) ...@@ -887,6 +887,8 @@ Dht::searchStep(std::shared_ptr<Search> sr)
} }
} }
//dumpSearch(*sr, std::cout);
/* periodic searchStep scheduling. */ /* periodic searchStep scheduling. */
if (not sr->done) if (not sr->done)
scheduler.edit(sr->nextSearchStep, sr->getNextStepTime(types, now)); scheduler.edit(sr->nextSearchStep, sr->getNextStepTime(types, now));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment