diff options
author | Roger Dingledine <arma@torproject.org> | 2016-04-13 01:30:29 -0400 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2016-05-09 14:40:54 -0400 |
commit | 59da060f10e6abd1681ad00dddd4410d52ce1781 (patch) | |
tree | 69c6d886fc40b90e1a992ac5ab8203d60d6f3c78 | |
parent | 91c58013be735584acc674a60bb18d1efb38f25a (diff) | |
download | tor-59da060f10e6abd1681ad00dddd4410d52ce1781.tar.gz tor-59da060f10e6abd1681ad00dddd4410d52ce1781.zip |
use the new function here too
-rw-r--r-- | src/or/networkstatus.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c index e90603e16b..4a9b36771b 100644 --- a/src/or/networkstatus.c +++ b/src/or/networkstatus.c @@ -865,21 +865,8 @@ update_consensus_networkstatus_downloads(time_t now) && i == usable_consensus_flavor()) { /* Check if we're already downloading a usable consensus */ - int consens_conn_count = - connection_dir_count_by_purpose_and_resource( - DIR_PURPOSE_FETCH_CONSENSUS, - resource); - int connect_consens_conn_count = - connection_dir_count_by_purpose_resource_and_state( - DIR_PURPOSE_FETCH_CONSENSUS, - resource, - DIR_CONN_STATE_CONNECTING); - - /* If not all connections are "connecting", then some are - * downloading. We want to have at most one downloading at a time. */ - if (connect_consens_conn_count < consens_conn_count) { + if (networkstatus_consensus_is_already_downloading(resource)) continue; - } /* Make multiple connections for a bootstrap consensus download. */ update_consensus_bootstrap_multiple_downloads(now, options, |