summaryrefslogtreecommitdiff
path: root/client/src/download.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-01-12 12:08:56 +0100
committermetamuffin <metamuffin@disroot.org>2025-01-12 12:08:56 +0100
commit7121bb7c49fcf5b24795c77100cb1ff46097ecb6 (patch)
tree8a8ea6cbbca75a8aa8e0394d07cfe4a3a0817e94 /client/src/download.rs
parentc626006c767f21d1ba0d452b64e244c7d69fa09b (diff)
downloadweareserver-7121bb7c49fcf5b24795c77100cb1ff46097ecb6.tar
weareserver-7121bb7c49fcf5b24795c77100cb1ff46097ecb6.tar.bz2
weareserver-7121bb7c49fcf5b24795c77100cb1ff46097ecb6.tar.zst
add scale and z_up arguments
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))