diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-11-14 13:03:21 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-11-14 13:03:21 +0000 |
commit | 0b1fb75c9b87c9edfac4256ae57790508b8d6b1a (patch) | |
tree | 37cee09a2e37e99a55c5b2ff1a220cb406152ad0 /src/dht | |
parent | 781ecece3a930b3d2a1a33ad9ed2bb590c010fc2 (diff) | |
download | gnunet-0b1fb75c9b87c9edfac4256ae57790508b8d6b1a.tar.gz gnunet-0b1fb75c9b87c9edfac4256ae57790508b8d6b1a.zip |
use exp backoff macro, start with retry frequency of 1s, instead of the insane 1ms
Diffstat (limited to 'src/dht')
-rw-r--r-- | src/dht/gnunet-service-dht_clients.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/dht/gnunet-service-dht_clients.c b/src/dht/gnunet-service-dht_clients.c index f3539dab9..1ff04f5ad 100644 --- a/src/dht/gnunet-service-dht_clients.c +++ b/src/dht/gnunet-service-dht_clients.c | |||
@@ -423,10 +423,7 @@ transmit_request (struct ClientQueryRecord *cqr) | |||
423 | GNUNET_CONTAINER_bloomfilter_free (peer_bf); | 423 | GNUNET_CONTAINER_bloomfilter_free (peer_bf); |
424 | 424 | ||
425 | /* exponential back-off for retries, max 1h */ | 425 | /* exponential back-off for retries, max 1h */ |
426 | cqr->retry_frequency = | 426 | cqr->retry_frequency = GNUNET_TIME_STD_BACKOFF (cqr->retry_frequency); |
427 | GNUNET_TIME_relative_min (GNUNET_TIME_UNIT_HOURS, | ||
428 | GNUNET_TIME_relative_multiply | ||
429 | (cqr->retry_frequency, 2)); | ||
430 | cqr->retry_time = GNUNET_TIME_relative_to_absolute (cqr->retry_frequency); | 427 | cqr->retry_time = GNUNET_TIME_relative_to_absolute (cqr->retry_frequency); |
431 | } | 428 | } |
432 | 429 | ||
@@ -590,7 +587,7 @@ handle_dht_local_get (void *cls, struct GNUNET_SERVER_Client *client, | |||
590 | cqr->xquery = (void *) &cqr[1]; | 587 | cqr->xquery = (void *) &cqr[1]; |
591 | memcpy (&cqr[1], xquery, xquery_size); | 588 | memcpy (&cqr[1], xquery, xquery_size); |
592 | cqr->hnode = GNUNET_CONTAINER_heap_insert (retry_heap, cqr, 0); | 589 | cqr->hnode = GNUNET_CONTAINER_heap_insert (retry_heap, cqr, 0); |
593 | cqr->retry_frequency = GNUNET_TIME_UNIT_MILLISECONDS; | 590 | cqr->retry_frequency = GNUNET_TIME_UNIT_SECONDS; |
594 | cqr->retry_time = GNUNET_TIME_absolute_get (); | 591 | cqr->retry_time = GNUNET_TIME_absolute_get (); |
595 | cqr->unique_id = get->unique_id; | 592 | cqr->unique_id = get->unique_id; |
596 | cqr->xquery_size = xquery_size; | 593 | cqr->xquery_size = xquery_size; |