summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ipcpd/normal/dht.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ipcpd/normal/dht.c b/src/ipcpd/normal/dht.c
index e4c37884..351819c0 100644
--- a/src/ipcpd/normal/dht.c
+++ b/src/ipcpd/normal/dht.c
@@ -2165,6 +2165,9 @@ uint64_t dht_query(struct dht * dht,
addrs[0] = 0;
+ if (dht_get_state(dht) != DHT_RUNNING)
+ return 0;
+
pthread_rwlock_rdlock(&dht->lock);
e = dht_find_entry(dht, key);