summaryrefslogtreecommitdiff
path: root/src/or/directory.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-01-25 15:51:13 -0500
committerNick Mathewson <nickm@torproject.org>2018-01-25 15:51:13 -0500
commite0049ef022b8bf9b808a9074820bb2a33f92ac1b (patch)
tree762121646ca7ab4dc3d88848c3d32fd958f351f7 /src/or/directory.h
parent7a74b3663fdaa40fc84e48990d15953a8f46a2bf (diff)
downloadtor-e0049ef022b8bf9b808a9074820bb2a33f92ac1b.tar.gz
tor-e0049ef022b8bf9b808a9074820bb2a33f92ac1b.zip
Remove the old ("deterministic") download schedule.
We haven't meant to use it since we introduced the random exponential schedule. Closes ticket 23814.
Diffstat (limited to 'src/or/directory.h')
-rw-r--r--src/or/directory.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/or/directory.h b/src/or/directory.h
index edf75ffe13..6008d3a88a 100644
--- a/src/or/directory.h
+++ b/src/or/directory.h
@@ -142,19 +142,13 @@ static inline int
download_status_is_ready(download_status_t *dls, time_t now,
int max_failures)
{
+ (void) max_failures; // 23814 REMOVE
+
/* dls wasn't reset before it was used */
if (dls->next_attempt_at == 0) {
download_status_reset(dls);
}
- if (dls->backoff == DL_SCHED_DETERMINISTIC) {
- /* Deterministic schedules can hit an endpoint; exponential backoff
- * schedules just wait longer and longer. */
- int under_failure_limit = (dls->n_download_failures <= max_failures
- && dls->n_download_attempts <= max_failures);
- if (!under_failure_limit)
- return 0;
- }
return download_status_get_next_attempt_at(dls) <= now;
}
@@ -260,7 +254,6 @@ MOCK_DECL(STATIC int, directory_handle_command_post,(dir_connection_t *conn,
const char *body,
size_t body_len));
STATIC int download_status_schedule_get_delay(download_status_t *dls,
- const smartlist_t *schedule,
int min_delay, int max_delay,
time_t now);