summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 2577efc7..a3f6308c 100644
--- a/src/ipcpd/normal/dht.c
+++ b/src/ipcpd/normal/dht.c
@@ -2538,7 +2538,8 @@ static void * dht_handle_sdu(void * o)
if (msg->code != KAD_JOIN) {
pthread_rwlock_wrlock(&dht->lock);
- if (dht->state == DHT_JOINING && dht->buckets == NULL) {
+ if (dht_get_state(dht) == DHT_JOINING &&
+ dht->buckets == NULL) {
pthread_rwlock_unlock(&dht->lock);
break;
}