File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -157,10 +157,12 @@ impl Manifestation {
157
157
let mut things_downloaded: Vec < String > = Vec :: new ( ) ;
158
158
let components = update. components_urls_and_hashes ( new_manifest) ?;
159
159
let components_len = components. len ( ) ;
160
+
161
+ const DEFAULT_CONCURRENT_DOWNLOADS : usize = 2 ;
160
162
let concurrent_downloads = download_cfg
161
163
. process
162
164
. concurrent_downloads ( )
163
- . unwrap_or ( components_len ) ;
165
+ . unwrap_or ( DEFAULT_CONCURRENT_DOWNLOADS ) ;
164
166
165
167
const DEFAULT_MAX_RETRIES : usize = 3 ;
166
168
let max_retries: usize = download_cfg
@@ -200,7 +202,7 @@ impl Manifestation {
200
202
. await
201
203
}
202
204
} ) ;
203
- if concurrent_downloads > 0 {
205
+ if components_len > 0 {
204
206
let results = component_stream
205
207
. buffered ( components_len)
206
208
. collect :: < Vec < _ > > ( )
You can’t perform that action at this time.
0 commit comments