mirror of
https://github.com/octoleo/restic.git
synced 2025-01-24 07:38:25 +00:00
restore: avoid long cancelation delay for frequently used blobs
This commit is contained in:
parent
f64191da9c
commit
c77b2d5ca2
@ -327,6 +327,11 @@ func (r *fileRestorer) downloadBlobs(ctx context.Context, packID restic.ID,
|
||||
}
|
||||
for file, offsets := range blob.files {
|
||||
for _, offset := range offsets {
|
||||
// avoid long cancelation delays for frequently used blobs
|
||||
if ctx.Err() != nil {
|
||||
return ctx.Err()
|
||||
}
|
||||
|
||||
writeToFile := func() error {
|
||||
// this looks overly complicated and needs explanation
|
||||
// two competing requirements:
|
||||
|
Loading…
x
Reference in New Issue
Block a user