Explorar o código

Log when falling back to nonfast/nonstabl routers

svn:r4869
Nick Mathewson %!s(int64=20) %!d(string=hai) anos
pai
achega
e863771485
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      src/or/circuitbuild.c

+ 5 - 1
src/or/circuitbuild.c

@@ -1168,8 +1168,12 @@ choose_good_exit_server_general(routerlist_t *dir, int need_uptime,
     smartlist_t *needed_ports = circuit_get_unhandled_ports(time(NULL));
     smartlist_t *needed_ports = circuit_get_unhandled_ports(time(NULL));
 
 
     if (best_support == -1) {
     if (best_support == -1) {
-      if (need_uptime || need_capacity)
+      if (need_uptime || need_capacity) {
+        log_fn(LOG_INFO, "We couldn't find any live%s%s routers; falling back to list of all routers",
+               need_capacity?", fast":"",
+               need_uptime?", stable":"");
         return choose_good_exit_server_general(dir, 0, 0);
         return choose_good_exit_server_general(dir, 0, 0);
+      }
       log(LOG_NOTICE, "All routers are down or middleman -- choosing a doomed exit at random.");
       log(LOG_NOTICE, "All routers are down or middleman -- choosing a doomed exit at random.");
     }
     }
     for (try = 0; try < 2; try++) {
     for (try = 0; try < 2; try++) {