diff options
author | Roger Dingledine <arma@torproject.org> | 2004-05-20 06:42:38 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-05-20 06:42:38 +0000 |
commit | faf2fdb1e0ddf2f2d0255a37224a1d9775f67d82 (patch) | |
tree | 1d6fb7c53f8f7136431e2a7d243949e2f6ac67fc | |
parent | 30a07b2ecd6093bd0f066a842a4fdae220be517d (diff) | |
download | tor-faf2fdb1e0ddf2f2d0255a37224a1d9775f67d82.tar.gz tor-faf2fdb1e0ddf2f2d0255a37224a1d9775f67d82.zip |
don't ever expire dirserver routerinfos!
svn:r1908
-rw-r--r-- | src/or/routerlist.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index a91a3b8cf6..5dca80370f 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -366,8 +366,9 @@ routerlist_remove_old_routers(void) cutoff = time(NULL) - ROUTER_MAX_AGE; for (i = 0; i < smartlist_len(routerlist->routers); ++i) { router = smartlist_get(routerlist->routers, i); - if (router->published_on < cutoff) { - /* Too old. Remove it. */ + if (router->published_on < cutoff && + !router->dir_port) { + /* Too old. Remove it. But never remove dirservers! */ log_fn(LOG_INFO,"Forgetting obsolete routerinfo for node %s.", router->nickname); routerinfo_free(router); smartlist_del(routerlist->routers, i--); |