diff options
author | teor <teor2345@gmail.com> | 2017-09-15 13:50:29 +1000 |
---|---|---|
committer | teor <teor2345@gmail.com> | 2017-09-15 13:50:29 +1000 |
commit | d60e7df2da5bfae62750bc4b41581d47e504e4bf (patch) | |
tree | 45e6510ad0adb2f60a3f18e5e484bdca87cabff6 /src/or/bridges.c | |
parent | d6568bad5e12af0e202f82c3ca86ae9aaeb443e4 (diff) | |
download | tor-d60e7df2da5bfae62750bc4b41581d47e504e4bf.tar.gz tor-d60e7df2da5bfae62750bc4b41581d47e504e4bf.zip |
Explain where bridge download statuses are initialised
And why we can't initialise them on config
Comment-only change, follow-up to 23347.
Diffstat (limited to 'src/or/bridges.c')
-rw-r--r-- | src/or/bridges.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/bridges.c b/src/or/bridges.c index 0d4549dd16..812b0ddce8 100644 --- a/src/or/bridges.c +++ b/src/or/bridges.c @@ -455,8 +455,8 @@ bridge_add_from_config(bridge_line_t *bridge_line) b->fetch_status.schedule = DL_SCHED_BRIDGE; b->fetch_status.backoff = DL_SCHED_RANDOM_EXPONENTIAL; b->fetch_status.increment_on = DL_SCHED_INCREMENT_ATTEMPT; - /* This will fail if UseBridges is not set -- and it does. */ - // download_status_reset(&b->fetch_status); + /* We can't reset the bridge's download status here, because UseBridges + * might be 0 now, and it might be changed to 1 much later. */ b->socks_args = bridge_line->socks_args; if (!bridge_list) bridge_list = smartlist_new(); @@ -625,6 +625,7 @@ fetch_bridge_descriptors(const or_options_t *options, time_t now) SMARTLIST_FOREACH_BEGIN(bridge_list, bridge_info_t *, bridge) { + /* This resets the download status on first use */ if (!download_status_is_ready(&bridge->fetch_status, now, IMPOSSIBLE_TO_DOWNLOAD)) continue; /* don't bother, no need to retry yet */ |