aboutsummaryrefslogtreecommitdiff
path: root/src/or/dns.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-08-15 23:46:18 +0000
committerRoger Dingledine <arma@torproject.org>2005-08-15 23:46:18 +0000
commit04d42ea4336c38dcb812757699513b4eaf89c95b (patch)
tree1b0ac34bf261092d4629378a87d14081d167bcc0 /src/or/dns.c
parentb1d3f124c46e954ef282c71586e34631e351c427 (diff)
downloadtor-04d42ea4336c38dcb812757699513b4eaf89c95b.tar
tor-04d42ea4336c38dcb812757699513b4eaf89c95b.tar.gz
rotate dns and cpu workers if the controller changes options that
will affect them. svn:r4787
Diffstat (limited to 'src/or/dns.c')
-rw-r--r--src/or/dns.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/dns.c b/src/or/dns.c
index 21ff68924..39ce5ff1c 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -102,6 +102,7 @@ void
dns_init(void)
{
init_cache_tree();
+ dnsworkers_rotate();
}
/** Helper: free storage held by an entry in the DNS cache. */
@@ -722,7 +723,8 @@ dnsworkers_rotate(void)
num_dnsworkers--;
}
last_rotation_time = time(NULL);
- spawn_enough_dnsworkers();
+ if (server_mode(get_options()))
+ spawn_enough_dnsworkers();
}
/** Implementation for DNS workers; this code runs in a separate