aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-03-29 19:28:16 +0000
committerNick Mathewson <nickm@torproject.org>2004-03-29 19:28:16 +0000
commit0e6084d751a66d45d5e6ac6d5d6de4771a24680f (patch)
tree17969cdb4d8c8e6c77dc65460d3f3be9a3155c12 /src/or/main.c
parent47b9d4439a77c4a8f90e7b3c566f0e10d228d854 (diff)
downloadtor-0e6084d751a66d45d5e6ac6d5d6de4771a24680f.tar
tor-0e6084d751a66d45d5e6ac6d5d6de4771a24680f.tar.gz
Remove descriptors that are older than 24 hours from the directory. Use strlcat instead of strncat to generate directories.
svn:r1361
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 3afefcb3e..3478008db 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -330,6 +330,9 @@ static void run_scheduled_events(time_t now) {
* Hope this doesn't bite us later. */
directory_initiate_command(router_pick_directory_server(),
DIR_CONN_STATE_CONNECTING_FETCH);
+ } else {
+ /* We're a directory; dump any old descriptors. */
+ dirserv_remove_old_servers();
}
time_to_fetch_directory = now + options.DirFetchPostPeriod;
}