diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-07-25 00:52:54 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-07-25 00:52:54 -0400 |
commit | 2b0e8fb39f0ac9c0bfadc64102440843300fa9d7 (patch) | |
tree | 226d63182870fb9ada2a7080c88d6a1b1adc6b19 /src/or/networkstatus.c | |
parent | 698ec8d7b97b048cdee1ba72fda0e08292cb1a7e (diff) | |
parent | e7576f92dec47ffb48f481b7a92b3fc0c76105eb (diff) | |
download | tor-2b0e8fb39f0ac9c0bfadc64102440843300fa9d7.tar.gz tor-2b0e8fb39f0ac9c0bfadc64102440843300fa9d7.zip |
Merge commit 'ioerror/DirFetchInfoExtraEarly'
Conflicts:
ChangeLog
Diffstat (limited to 'src/or/networkstatus.c')
-rw-r--r-- | src/or/networkstatus.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c index e78aefc5fa..97353c01da 100644 --- a/src/or/networkstatus.c +++ b/src/or/networkstatus.c @@ -1133,8 +1133,13 @@ update_consensus_networkstatus_fetch_time(time_t now) /* We want to cache the next one at some point after this one * is no longer fresh... */ start = c->fresh_until + CONSENSUS_MIN_SECONDS_BEFORE_CACHING; - /* But only in the first half-interval after that. */ - dl_interval = interval/2; + /* Some clients may need the consensus sooner than others. */ + if (options->FetchDirInfoExtraEarly) { + dl_interval = 60; + } else { + /* But only in the first half-interval after that. */ + dl_interval = interval/2; + } } else { /* We're an ordinary client or a bridge. Give all the caches enough * time to download the consensus. */ |