]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
more bulletproof reachability testing
authorRoger Dingledine <arma@torproject.org>
Sat, 22 Jul 2006 05:29:31 +0000 (05:29 +0000)
committerRoger Dingledine <arma@torproject.org>
Sat, 22 Jul 2006 05:29:31 +0000 (05:29 +0000)
svn:r6804

src/or/config.c
src/or/main.c

index fcca7acf91378db9b0f3408c7f112ac603c79044..e0dd745a9883d3c4be7ab46c2dfbd582116583b5 100644 (file)
@@ -796,7 +796,8 @@ options_act(or_options_t *old_options)
           return -1;
         }
         server_has_changed_ip();
-        if (has_completed_circuit)
+        if (has_completed_circuit ||
+            rep_hist_circbuilding_dormant(time(NULL)))
           inform_testing_reachability();
       }
       cpuworkers_rotate();
index 6623c10f79a1f6b8c31e4283945e56f2324bc128..ca3742a5c990fd722af7faf4ca9f5f490aa8453f 100644 (file)
@@ -568,8 +568,8 @@ directory_info_has_arrived(time_t now, int from_cache)
     return;
   }
 
-  if (server_mode(options) && !we_are_hibernating() &&
-      !from_cache && has_completed_circuit)
+  if (server_mode(options) && !we_are_hibernating() && !from_cache &&
+      (has_completed_circuit || rep_hist_circbuilding_dormant(now)))
     consider_testing_reachability();
 }
 
@@ -833,7 +833,7 @@ run_scheduled_events(time_t now)
     /* also, check religiously for reachability, if it's within the first
      * 20 minutes of our uptime. */
     if (server_mode(options) &&
-        has_completed_circuit &&
+        (has_completed_circuit || rep_hist_circbuilding_dormant(now)) &&
         stats_n_seconds_working < TIMEOUT_UNTIL_UNREACHABILITY_COMPLAINT &&
         !we_are_hibernating())
       consider_testing_reachability();