From 2b57c8109ad23fccd45a0d7bacb75b268fe44200 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Thu, 19 May 2016 17:29:13 -0400
Subject: [PATCH] dht: clear announces on expire

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

diff --git a/src/dht.cpp b/src/dht.cpp
index 260a4854..9e2121ae 100644
--- a/src/dht.cpp
+++ b/src/dht.cpp
@@ -886,6 +886,7 @@ Dht::searchStep(std::shared_ptr<Search> sr)
                 for (const auto& a : sr->announce)
                     if (a.callback)
                         a_cbs.emplace_back(std::move(a.callback));
+                sr->announce.clear();
                 for (const auto& a : a_cbs)
                     a(false, {});
             }
-- 
GitLab