From a4e2cf58b764c72c9ef9612e91c1b6ac567a6202 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Mon, 14 Dec 2009 21:14:28 +0100 Subject: [PATCH] Wake less eagerly after neighborhood maintenance. --- dht.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dht.c b/dht.c index ade8c28..4e69362 100644 --- a/dht.c +++ b/dht.c @@ -1652,7 +1652,7 @@ neighbourhood_maintenance(int af) struct node *n; if(b == NULL) - return -1; + return 0; memcpy(id, myid, 20); id[19] = random() & 0xFF; @@ -1679,8 +1679,9 @@ neighbourhood_maintenance(int af) n->reply_time >= now.tv_sec - 15); pinged(n, q); } + return 1; } - return 1; + return 0; } static int