aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-01-29 01:11:41 +0000
committerRoger Dingledine <arma@torproject.org>2006-01-29 01:11:41 +0000
commit8fc44169e59386220fbb3b8d42c1f831236ad6c3 (patch)
tree5952b28a2bc6a742493a3afe41edb52cea14d024 /src
parent05cf1e0202544363df2c19aa1c10476ab64f34a0 (diff)
downloadtor-8fc44169e59386220fbb3b8d42c1f831236ad6c3.tar.gz
tor-8fc44169e59386220fbb3b8d42c1f831236ad6c3.zip
only start testing reachability once we've established a circuit.
this will make startup on dirservers less noisy. it may also break things in subtle ways. svn:r5878
Diffstat (limited to 'src')
-rw-r--r--src/or/circuitbuild.c1
-rw-r--r--src/or/main.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index b14d94c8ea..5b7c0e5269 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -610,6 +610,7 @@ circuit_send_next_onion_skin(circuit_t *circ)
"Tor has successfully opened a circuit. Looks like it's working.");
if (server_mode(options) && !check_whether_orport_reachable()) {
inform_testing_reachability();
+ consider_testing_reachability();
}
}
circuit_rep_hist_note_result(circ);
diff --git a/src/or/main.c b/src/or/main.c
index ba7fdd0a9d..e8c4ff3148 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -575,7 +575,7 @@ directory_info_has_arrived(time_t now, int from_cache)
!we_are_hibernating()) { /* connect to the appropriate routers */
if (!authdir_mode(options))
router_retry_connections(0, 1);
- if (!from_cache)
+ if (!from_cache && has_completed_circuit)
consider_testing_reachability();
}
}
@@ -826,6 +826,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 &&
stats_n_seconds_working < TIMEOUT_UNTIL_UNREACHABILITY_COMPLAINT &&
!we_are_hibernating())
consider_testing_reachability();