]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
refetch bridge descriptors in a timely fashion
authorRoger Dingledine <arma@torproject.org>
Mon, 16 May 2011 16:58:44 +0000 (12:58 -0400)
committerRoger Dingledine <arma@torproject.org>
Wed, 18 May 2011 00:48:46 +0000 (20:48 -0400)
When we configure a new bridge via the controller, don't wait up to ten
seconds before trying to fetch its descriptor. This wasn't so bad when
you listed your bridges in torrc, but it's dreadful if you configure
your bridges via vidalia.

changes/bug3198 [new file with mode: 0644]
src/or/main.c

diff --git a/changes/bug3198 b/changes/bug3198
new file mode 100644 (file)
index 0000000..29c1685
--- /dev/null
@@ -0,0 +1,4 @@
+  o Major bugfixes:
+    - When we configure a new bridge via the controller, don't wait up
+      to ten seconds before trying to fetch its descriptor. Bugfix on
+      0.2.0.3-alpha; fixes bug 3198 (suggested by 2355).
index d700f0e7a85d179996dbe3e23801e5a0364e867c..2c950245ac56caf4472e2a5796bd0ee8f128476f 100644 (file)
@@ -924,8 +924,6 @@ run_scheduled_events(time_t now)
   if (time_to_try_getting_descriptors < now) {
     update_router_descriptor_downloads(now);
     update_extrainfo_downloads(now);
-    if (options->UseBridges)
-      fetch_bridge_descriptors(options, now);
     if (router_have_minimum_dir_info())
       time_to_try_getting_descriptors = now + LAZY_DESCRIPTOR_RETRY_INTERVAL;
     else
@@ -938,6 +936,9 @@ run_scheduled_events(time_t now)
       now + DESCRIPTOR_FAILURE_RESET_INTERVAL;
   }
 
+  if (options->UseBridges)
+    fetch_bridge_descriptors(options, now);
+
   /** 1b. Every MAX_SSL_KEY_LIFETIME seconds, we change our TLS context. */
   if (!last_rotated_x509_certificate)
     last_rotated_x509_certificate = now;