diff options
author | teor <teor2345@gmail.com> | 2017-07-05 01:29:35 +1000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-07-07 13:18:04 -0400 |
commit | 344f5a71c5a2a697050c7e6545578c5a01eee0a5 (patch) | |
tree | 2fdc8e2256e8d65fc0bbd789abc0f6b610443028 /src/or/directory.c | |
parent | f813b05202171a1b39d9428e68885b36fcceef11 (diff) | |
download | tor-344f5a71c5a2a697050c7e6545578c5a01eee0a5.tar.gz tor-344f5a71c5a2a697050c7e6545578c5a01eee0a5.zip |
Use download_status_get_next_attempt_at() more often
This guards against future occurrences of 17750.
Diffstat (limited to 'src/or/directory.c')
-rw-r--r-- | src/or/directory.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index 3eb56c2b82..ea9d69b158 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -3983,14 +3983,16 @@ download_status_increment_failure(download_status_t *dls, int status_code, download_status_log_helper(item, !dls->increment_on, "failed", "concurrently", dls->n_download_failures, - increment, dls->next_attempt_at, now); + increment, + download_status_get_next_attempt_at(dls), + now); if (dls->increment_on == DL_SCHED_INCREMENT_ATTEMPT) { /* stop this schedule retrying on failure, it will launch concurrent * connections instead */ return TIME_MAX; } else { - return dls->next_attempt_at; + return download_status_get_next_attempt_at(dls); } } @@ -4034,9 +4036,10 @@ download_status_increment_attempt(download_status_t *dls, const char *item, download_status_log_helper(item, dls->increment_on, "attempted", "on failure", dls->n_download_attempts, - delay, dls->next_attempt_at, now); + delay, download_status_get_next_attempt_at(dls), + now); - return dls->next_attempt_at; + return download_status_get_next_attempt_at(dls); } static time_t |