From a120cc20c171164230d592337425e9016747f182 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Wed, 24 Aug 2005 02:31:02 +0000 Subject: Dirservers now do their own external reachability testing of each Tor server, and only list them as running if they've been found to be reachable. Dirservers also log trouble servers, but only start complaining loudly after they've been up for an hour, to reduce false positives. We still need to do something about the fact that it is quite loud when there are many trouble servers. svn:r4829 --- src/or/router.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/or/router.c') diff --git a/src/or/router.c b/src/or/router.c index 9bb4716b4a..bbb43db67f 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -568,10 +568,13 @@ consider_publishable_server(time_t now, int force) /** OR only: if in clique mode, try to open connections to all of the * other ORs we know about. Otherwise, open connections to those we - * think are in clique mode. + * think are in clique mode.o + * + * If force is zero, only open the connection if we don't already + * have one. */ void -router_retry_connections(void) +router_retry_connections(int force) { int i; routerinfo_t *router; @@ -588,10 +591,12 @@ router_retry_connections(void) continue; if (!clique_mode(options) && !router_is_clique_mode(router)) continue; - if (!connection_get_by_identity_digest(router->identity_digest, + if (force || + !connection_get_by_identity_digest(router->identity_digest, CONN_TYPE_OR)) { - /* not in the list */ - log_fn(LOG_DEBUG,"connecting to OR at %s:%u.",router->address,router->or_port); + log_fn(LOG_INFO,"%sconnecting to %s at %s:%u.", + clique_mode(options) ? "(forced) " : "", + router->nickname, router->address, router->or_port); connection_or_connect(router->addr, router->or_port, router->identity_digest); } } -- cgit v1.2.3-54-g00ecf