diff options
author | Mike Perry <mikeperry-git@fscked.org> | 2012-10-25 17:43:10 -0700 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-12-07 10:34:09 -0500 |
commit | 42e3c04a7a5fb47a97766e54c72885c5c2bf23a9 (patch) | |
tree | 8152658f1006592a3b35d88e8fcf7d1c4ae9ad0f /src/or/circuitstats.c | |
parent | bd93ff8dd76b06ca3afe1f362b086d4f12639f71 (diff) | |
download | tor-42e3c04a7a5fb47a97766e54c72885c5c2bf23a9.tar.gz tor-42e3c04a7a5fb47a97766e54c72885c5c2bf23a9.zip |
Bug 3443: Don't count ORconn setup in circuit build time.
Also, add a hack Roger suggested where we're more patient if no circuits are
opened yet.
Diffstat (limited to 'src/or/circuitstats.c')
-rw-r--r-- | src/or/circuitstats.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/or/circuitstats.c b/src/or/circuitstats.c index 6d529d1e43..4f12a6fbcd 100644 --- a/src/or/circuitstats.c +++ b/src/or/circuitstats.c @@ -1469,11 +1469,6 @@ circuit_build_times_set_timeout_worker(circuit_build_times_t *cbt) max_time = circuit_build_times_max(cbt); - /* Sometimes really fast guard nodes give us such a steep curve - * that this ends up being not that much greater than timeout_ms. - * Make it be at least 1 min to handle this case. */ - cbt->close_ms = MAX(cbt->close_ms, circuit_build_times_initial_timeout()); - if (cbt->timeout_ms > max_time) { log_info(LD_CIRC, "Circuit build timeout of %dms is beyond the maximum build " @@ -1490,6 +1485,11 @@ circuit_build_times_set_timeout_worker(circuit_build_times_t *cbt) cbt->close_ms = 2*max_time; } + /* Sometimes really fast guard nodes give us such a steep curve + * that this ends up being not that much greater than timeout_ms. + * Make it be at least 1 min to handle this case. */ + cbt->close_ms = MAX(cbt->close_ms, circuit_build_times_initial_timeout()); + cbt->have_computed_timeout = 1; return 1; } |