summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/dht.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipcpd/normal/dht.c')
-rw-r--r--src/ipcpd/normal/dht.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ipcpd/normal/dht.c b/src/ipcpd/normal/dht.c
index cd381c5b..836a0c53 100644
--- a/src/ipcpd/normal/dht.c
+++ b/src/ipcpd/normal/dht.c
@@ -2477,7 +2477,8 @@ static void * dht_handle_sdu(void * o)
break;
}
- if (msg->code != KAD_JOIN) {
+ if (msg->code != KAD_JOIN &&
+ dht_get_state(dht) == DHT_RUNNING) {
pthread_rwlock_wrlock(&dht->lock);
if (dht_update_bucket(dht, msg->s_id.data, addr))
log_warn("Failed to update bucket.");