]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
when we're counting how many descriptors to not download, be a
authorRoger Dingledine <arma@torproject.org>
Fri, 18 Jan 2008 04:47:03 +0000 (04:47 +0000)
committerRoger Dingledine <arma@torproject.org>
Fri, 18 Jan 2008 04:47:03 +0000 (04:47 +0000)
little bit more accurate

svn:r13173

src/or/routerlist.c

index 7097cb64ddd0eeb530fb0fa0d32155d04a863512..5aa934ae64d3157166f04a3a07fd20d1504d5dd4 100644 (file)
@@ -3821,6 +3821,10 @@ update_consensus_router_descriptor_downloads(time_t now)
         }
         continue; /* We have it already. */
       }
+      if (digestmap_get(map, rs->descriptor_digest)) {
+        ++n_inprogress;
+        continue; /* We have an in-progress download. */
+      }
       if (!download_status_is_ready(&rs->dl_status, now,
                                     MAX_ROUTERDESC_DOWNLOAD_FAILURES)) {
         ++n_delayed; /* Not ready for retry. */
@@ -3835,10 +3839,6 @@ update_consensus_router_descriptor_downloads(time_t now)
         ++n_wouldnt_use;
         continue; /* We would never use it ourself. */
       }
-      if (digestmap_get(map, rs->descriptor_digest)) {
-        ++n_inprogress;
-        continue; /* We have an in-progress download. */
-      }
       smartlist_add(downloadable, rs->descriptor_digest);
     });