From 04d42ea4336c38dcb812757699513b4eaf89c95b Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Mon, 15 Aug 2005 23:46:18 +0000 Subject: rotate dns and cpu workers if the controller changes options that will affect them. svn:r4787 --- src/or/dns.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/or/dns.c') diff --git a/src/or/dns.c b/src/or/dns.c index 21ff689249..39ce5ff1c4 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 -- cgit v1.2.3-54-g00ecf