aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.c
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@persephoneslair.org>2012-06-12 12:24:05 -0700
committerNick Mathewson <nickm@torproject.org>2012-06-13 16:45:13 -0400
commit39a9178ba779af4201f3b6cc6d9db4a70ac058dd (patch)
tree7de58c2d47c0ef454af5f047214b9e622233b154 /src/or/circuitbuild.c
parent0c3c0b1ddd97d9bad4d7a0e875ef46729245ffda (diff)
downloadtor-39a9178ba779af4201f3b6cc6d9db4a70ac058dd.tar
tor-39a9178ba779af4201f3b6cc6d9db4a70ac058dd.tar.gz
Early exit from circuit_build_times_set_timeout() if adaptive timeouts are disabled
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r--src/or/circuitbuild.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 8efaa7cf4..03b702bed 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -1598,6 +1598,12 @@ circuit_build_times_set_timeout(circuit_build_times_t *cbt)
long prev_timeout = tor_lround(cbt->timeout_ms/1000);
double timeout_rate;
+ /*
+ * Just return if we aren't using adaptive timeouts
+ */
+ if (circuit_build_times_disabled())
+ return;
+
if (!circuit_build_times_set_timeout_worker(cbt))
return;