summaryrefslogtreecommitdiff
path: root/client/src/download.rs
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/download.rs')
-rw-r--r--client/src/download.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/client/src/download.rs b/client/src/download.rs
index 85cce32..2d61a53 100644
--- a/client/src/download.rs
+++ b/client/src/download.rs
@@ -84,7 +84,11 @@ impl Downloader {
pub fn update(&self, network: &Network) -> Result<()> {
let mut state = self.inner.write().unwrap();
let mut new_pending = Vec::new();
- for n in state.need.difference(&state.pending) {
+ for n in state
+ .need
+ .difference(&state.pending)
+ .take(32 - state.pending.len())
+ {
network
.packet_send
.send(Packet::RequestResource(*n))