diff options
author | Roger Dingledine <arma@torproject.org> | 2010-04-21 03:12:14 -0400 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2010-04-21 03:12:14 -0400 |
commit | 4f307e038272e368cd307ffa5e31b568b0729c48 (patch) | |
tree | e4610ee1eb11c869440d81ac57b88963ad3ac327 /src/or/routerlist.c | |
parent | 7231e289dd93d6aa3d17c46fd8ae44e70b365980 (diff) | |
download | tor-4f307e038272e368cd307ffa5e31b568b0729c48.tar.gz tor-4f307e038272e368cd307ffa5e31b568b0729c48.zip |
immediate reachability check for new relays
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r-- | src/or/routerlist.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 637163a754..f4db40d25f 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -3204,7 +3204,7 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg, if (!in_consensus && (router->cache_info.published_on <= old_router->cache_info.published_on)) { /* Same key, but old. This one is not listed in the consensus. */ - log_debug(LD_DIR, "Skipping not-new descriptor for router '%s'", + log_debug(LD_DIR, "Not-new descriptor for router '%s'", router->nickname); /* Only journal this desc if we'll be serving it. */ if (!from_cache && should_cache_old_descriptors()) @@ -3247,9 +3247,15 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg, /* We haven't seen a router with this identity before. Add it to the end of * the list. */ routerlist_insert(routerlist, router); - if (!from_cache) + if (!from_cache) { + if (authdir) { + /* launch an immediate reachability test, so we will have an opinion + * soon in case we're generating a consensus soon */ + dirserv_single_reachability_test(time(NULL), router); + } signed_desc_append_to_journal(&router->cache_info, &routerlist->desc_store); + } directory_set_dirty(); return ROUTER_ADDED_SUCCESSFULLY; } |