소스 검색

Merge remote-tracking branch 'teor/feature17864'

Nick Mathewson 8 년 전
부모
커밋
10e442ba93
2개의 변경된 파일11개의 추가작업 그리고 4개의 파일을 삭제
  1. 5 0
      changes/feature17864
  2. 6 4
      src/or/routerlist.c

+ 5 - 0
changes/feature17864

@@ -0,0 +1,5 @@
+  o Minor feature (directory downloads):
+    - Wait for busy authorities and fallbacks to become non-busy when
+      bootstrapping. (A similar change was made in 6c443e987d for
+      directory servers chosen from the consensus.)
+      Closes ticket 17864; patch by "teor".

+ 6 - 4
src/or/routerlist.c

@@ -1739,22 +1739,24 @@ router_pick_trusteddirserver_impl(const smartlist_t *sourcelist,
       result = &selection->fake_status;
   }
 
-  if (n_busy_out)
-    *n_busy_out = n_busy;
-
   smartlist_free(direct);
   smartlist_free(tunnel);
   smartlist_free(overloaded_direct);
   smartlist_free(overloaded_tunnel);
 
-  if (result == NULL && try_excluding && !options->StrictNodes && n_excluded) {
+  if (result == NULL && try_excluding && !options->StrictNodes && n_excluded
+      && !n_busy) {
     /* If we got no result, and we are excluding nodes, and StrictNodes is
      * not set, try again without excluding nodes. */
     try_excluding = 0;
     n_excluded = 0;
+    n_busy = 0;
     goto retry_without_exclude;
   }
 
+  if (n_busy_out)
+    *n_busy_out = n_busy;
+
   return result;
 }