From 71b6998ea08a70904c9387d7c840b2f14045bf99 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Thu, 28 Jan 2016 01:02:16 -0500
Subject: [PATCH] dht: step to clear announces in case of failure

---
 src/dht.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/dht.cpp b/src/dht.cpp
index 55d7fafb..23ed5541 100644
--- a/src/dht.cpp
+++ b/src/dht.cpp
@@ -1201,7 +1201,7 @@ Dht::Search::getUpdateTime(time_point now) const
         if (not sn.candidate and ++i == TARGET_NODES)
             break;
     }
-    if (not callbacks.empty() and d == 0) {
+    if ((not callbacks.empty() or not announce.empty()) and d == 0) {
         // If all synced/updated but some callbacks remain, step now to clear them
         return now;
     }
-- 
GitLab