Refactor exponential backoff multipliers into macros

There are only so many times you can type "4".
This commit is contained in:
teor
2017-07-05 01:32:06 +10:00
committed by Nick Mathewson
parent f30d355903
commit 32f0cbc0f6
3 changed files with 16 additions and 4 deletions
+1 -1
View File
@@ -3610,7 +3610,7 @@ download_status_random_backoff_helper(int min_delay, int max_delay)
int increment = -1;
int old_increment = -1;
time_t current_time = time(NULL);
const int exponent = 4;
const int exponent = DIR_DEFAULT_RANDOM_MULTIPLIER + 1;
/* Check the random backoff cases */
do {