Browse Source

more bulletproof reachability testing

svn:r6804
Roger Dingledine 19 years ago
parent
commit
444f096d2d
2 changed files with 5 additions and 4 deletions
  1. 2 1
      src/or/config.c
  2. 3 3
      src/or/main.c

+ 2 - 1
src/or/config.c

@@ -796,7 +796,8 @@ options_act(or_options_t *old_options)
           return -1;
           return -1;
         }
         }
         server_has_changed_ip();
         server_has_changed_ip();
-        if (has_completed_circuit)
+        if (has_completed_circuit ||
+            rep_hist_circbuilding_dormant(time(NULL)))
           inform_testing_reachability();
           inform_testing_reachability();
       }
       }
       cpuworkers_rotate();
       cpuworkers_rotate();

+ 3 - 3
src/or/main.c

@@ -568,8 +568,8 @@ directory_info_has_arrived(time_t now, int from_cache)
     return;
     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();
     consider_testing_reachability();
 }
 }
 
 
@@ -833,7 +833,7 @@ run_scheduled_events(time_t now)
     /* also, check religiously for reachability, if it's within the first
     /* also, check religiously for reachability, if it's within the first
      * 20 minutes of our uptime. */
      * 20 minutes of our uptime. */
     if (server_mode(options) &&
     if (server_mode(options) &&
-        has_completed_circuit &&
+        (has_completed_circuit || rep_hist_circbuilding_dormant(now)) &&
         stats_n_seconds_working < TIMEOUT_UNTIL_UNREACHABILITY_COMPLAINT &&
         stats_n_seconds_working < TIMEOUT_UNTIL_UNREACHABILITY_COMPLAINT &&
         !we_are_hibernating())
         !we_are_hibernating())
       consider_testing_reachability();
       consider_testing_reachability();