Add more error handling

This commit is contained in:
Alexander Neumann
2021-01-30 20:19:47 +01:00
parent aef3658a5f
commit 0858fbf6aa
23 changed files with 91 additions and 36 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ func DefaultLoad(ctx context.Context, h restic.Handle, length int, offset int64,
}
err = fn(rd)
if err != nil {
rd.Close() // ignore secondary errors closing the reader
_ = rd.Close() // ignore secondary errors closing the reader
return err
}
return rd.Close()