浏览代码

Only launch dns workers when we are actually starting a server.

svn:r3137
Nick Mathewson 21 年之前
父节点
当前提交
972124aab9
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/or/main.c

+ 2 - 1
src/or/main.c

@@ -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 */
   }