From: Nick Mathewson Date: Tue, 17 Aug 2010 16:07:19 +0000 (-0400) Subject: Merge branch 'maint-0.2.1' X-Git-Tag: tor-0.2.2.15-alpha~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ffe105598135a92777d78cc82399fa281c52c5f;p=thirdparty%2Ftor.git Merge branch 'maint-0.2.1' Resolved conflict in src/or/networkstatus.c --- 5ffe105598135a92777d78cc82399fa281c52c5f diff --cc src/or/networkstatus.c index 0ec69cb29b,4721420bbd..c0a3a28e4b --- a/src/or/networkstatus.c +++ b/src/or/networkstatus.c @@@ -1234,14 -1146,9 +1244,16 @@@ update_consensus_networkstatus_fetch_ti if (directory_fetches_dir_info_early(options)) { /* 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; + start = c->fresh_until + min_sec_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; ++ if (min_sec_before_caching + dl_interval > interval) ++ dl_interval = interval/2; + } 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. */