From faf2fdb1e0ddf2f2d0255a37224a1d9775f67d82 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Thu, 20 May 2004 06:42:38 +0000 Subject: [PATCH] don't ever expire dirserver routerinfos! svn:r1908 --- src/or/routerlist.c | 5 +++-- 1 file 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--);