[tor-commits] [tor/master] Early exit from circuit_build_times_set_timeout() if adaptive timeouts are disabled

nickm at torproject.org nickm at torproject.org
Wed Jun 13 21:04:12 UTC 2012


commit 39a9178ba779af4201f3b6cc6d9db4a70ac058dd
Author: Andrea Shepard <andrea at persephoneslair.org>
Date:   Tue Jun 12 12:24:05 2012 -0700

    Early exit from circuit_build_times_set_timeout() if adaptive timeouts are disabled
---
 src/or/circuitbuild.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 8efaa7c..03b702b 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;
 





More information about the tor-commits mailing list