]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Only launch dns workers when we are actually starting a server.
authorNick Mathewson <nickm@torproject.org>
Mon, 13 Dec 2004 00:09:00 +0000 (00:09 +0000)
committerNick Mathewson <nickm@torproject.org>
Mon, 13 Dec 2004 00:09:00 +0000 (00:09 +0000)
svn:r3137

src/or/main.c

index 5404a9a0e4c7def401175380fb1d6d1f16e94141..aa74dfacb678b4e7cb0f9464c14170b78adcc8ba 100644 (file)
@@ -1097,7 +1097,8 @@ static int tor_init(int argc, char *argv[]) {
     log_fn(LOG_WARN,"You are running Tor as root. You don't need to, and you probably shouldn't.");
 #endif
 
-  if (server_mode(get_options())) { /* only spawn dns handlers if we're a router */
+  /* only spawn dns handlers if we're a router */
+  if (server_mode(get_options()) && get_options()->command == CMD_RUN_TOR) {
     dns_init(); /* initialize the dns resolve tree, and spawn workers */
   }