diff --git a/src/dht.cpp b/src/dht.cpp index 4aa6ec329815dd8ddab0a6a07d49edc70cfda43c..38b3c803252742ddcda9f6ea5487f0094a51c00d 100644 --- a/src/dht.cpp +++ b/src/dht.cpp @@ -270,7 +270,7 @@ struct Dht::Search { unsigned currentGetRequests() const { unsigned count = 0; for (const auto& n : nodes) - if (n.getStatus and n.getStatus->pending()) + if (not n.isBad() and n.getStatus and n.getStatus->pending()) count++; return count; } @@ -887,6 +887,8 @@ Dht::searchStep(std::shared_ptr<Search> sr) } } + //dumpSearch(*sr, std::cout); + /* periodic searchStep scheduling. */ if (not sr->done) scheduler.edit(sr->nextSearchStep, sr->getNextStepTime(types, now));