From b0536d9e02119befb13890b5fa4a43b32f9e8438 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com> Date: Thu, 23 Apr 2020 16:01:30 -0400 Subject: [PATCH] search: expire only after candidate expiration --- src/search.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search.h b/src/search.h index a9a4194b..b02f2a7b 100644 --- a/src/search.h +++ b/src/search.h @@ -616,7 +616,7 @@ struct Dht::Search { unsigned getNumberOfConsecutiveBadNodes() const { unsigned count = 0; 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; ++count; return false; -- GitLab