Skip to content
Snippets Groups Projects
Commit 858867a3 authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

Allow infinitely long delays in exponential-backoff downloads

It's only safe to remove the failure limit (per 20536) if we are in
fact waiting a bit longer each time we try to download.

Fixes bug 20534; bugfix on 0.2.9.1-alpha.
parent 5385a023
No related branches found
No related tags found
No related merge requests found
o Minor bugfixes (directory download scheduling):
- Remove the maximum delay on exponential-backoff scheduling.
Since we now allow an infinite number of failures (see ticket
20536), we must now allow the time to grow longer on each failure.
Fixes bug 20534; bugfix on 0.2.9.1-alpha.
......@@ -3770,7 +3770,10 @@ find_dl_min_and_max_delay(download_status_t *dls, const or_options_t *options,
const smartlist_t *schedule = find_dl_schedule(dls, options);
tor_assert(schedule != NULL && smartlist_len(schedule) >= 2);
*min = *((int *)(smartlist_get(schedule, 0)));
*max = *((int *)((smartlist_get(schedule, smartlist_len(schedule) - 1))));
if (dls->backoff == DL_SCHED_DETERMINISTIC)
*max = *((int *)((smartlist_get(schedule, smartlist_len(schedule) - 1))));
else
*max = INT_MAX;
}
/** Advance one delay step. The algorithm is to use the previous delay to
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment