Skip to content

Commit a4a2d49

Browse files
authored
Merge pull request #874 from sam-berning/tokio-flush
tough: flush file explicitly in cache
2 parents 91ae674 + 237247b commit a4a2d49

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tough/src/cache.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,11 @@ impl Repository {
218218
.await
219219
.context(error::TransportSnafu { url })?;
220220
file.write_all(&root_file_data)
221+
.await
222+
.context(error::CacheFileWriteSnafu {
223+
path: outpath.clone(),
224+
})?;
225+
file.flush()
221226
.await
222227
.context(error::CacheFileWriteSnafu { path: outpath })
223228
}

0 commit comments

Comments
 (0)