src/client/http_client.rs: append chunks in correct order

We need to wait for response from upload_chunk. After that we can
add the chunk to the index file.
This commit is contained in:
Dietmar Maurer
2019-05-26 09:57:34 +02:00
parent 417cb0731e
commit 05cba08c9c
3 changed files with 83 additions and 41 deletions

View File

@ -96,7 +96,6 @@ fn upload_dynamic_chunk(
let result = result.and_then(|(digest, size)| {
env.register_chunk(digest, size)?;
env.dynamic_writer_append_chunk(wid, offset, size, &digest)?;
Ok(json!(tools::digest_to_hex(&digest)))
});