mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
so which is it? TIME_MAX or INT_MAX? pick INT_MAX for now.
svn:r17772
This commit is contained in:
parent
a12c3f2c86
commit
4ff04fda77
@ -3332,20 +3332,20 @@ download_status_increment_failure(download_status_t *dls, int status_code,
|
|||||||
if (dls->n_download_failures < schedule_len)
|
if (dls->n_download_failures < schedule_len)
|
||||||
increment = schedule[dls->n_download_failures];
|
increment = schedule[dls->n_download_failures];
|
||||||
else if (dls->n_download_failures == IMPOSSIBLE_TO_DOWNLOAD)
|
else if (dls->n_download_failures == IMPOSSIBLE_TO_DOWNLOAD)
|
||||||
increment = TIME_MAX;
|
increment = INT_MAX;
|
||||||
else
|
else
|
||||||
increment = schedule[schedule_len-1];
|
increment = schedule[schedule_len-1];
|
||||||
|
|
||||||
if (increment < INT_MAX)
|
if (increment < INT_MAX)
|
||||||
dls->next_attempt_at = now+increment;
|
dls->next_attempt_at = now+increment;
|
||||||
else
|
else
|
||||||
dls->next_attempt_at = TIME_MAX;
|
dls->next_attempt_at = INT_MAX;
|
||||||
|
|
||||||
if (item) {
|
if (item) {
|
||||||
if (dls->next_attempt_at == 0)
|
if (dls->next_attempt_at == 0)
|
||||||
log_debug(LD_DIR, "%s failed %d time(s); I'll try again immediately.",
|
log_debug(LD_DIR, "%s failed %d time(s); I'll try again immediately.",
|
||||||
item, (int)dls->n_download_failures);
|
item, (int)dls->n_download_failures);
|
||||||
else if (dls->next_attempt_at < TIME_MAX)
|
else if (dls->next_attempt_at < INT_MAX)
|
||||||
log_debug(LD_DIR, "%s failed %d time(s); I'll try again in %d seconds.",
|
log_debug(LD_DIR, "%s failed %d time(s); I'll try again in %d seconds.",
|
||||||
item, (int)dls->n_download_failures,
|
item, (int)dls->n_download_failures,
|
||||||
(int)(dls->next_attempt_at-now));
|
(int)(dls->next_attempt_at-now));
|
||||||
|
Loading…
Reference in New Issue
Block a user