From f6b934031364d33375d4143731da9da6330c9998 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Sat, 14 May 2016 16:53:35 -0400
Subject: [PATCH] dht: avoid to discard storage with local listener

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

diff --git a/src/dht.cpp b/src/dht.cpp
index 39a5df08..d647f80b 100644
--- a/src/dht.cpp
+++ b/src/dht.cpp
@@ -1725,7 +1725,7 @@ Dht::expireStorage()
         total_store_size += stats.first;
         total_values += stats.second;
 
-        if (i->empty() && i->listeners.empty()) {
+        if (i->empty() && i->listeners.empty() && i->local_listeners.empty()) {
             DHT_LOG.DEBUG("Discarding expired value %s", i->id.toString().c_str());
             i = store.erase(i);
         }
-- 
GitLab