storagenode/pieces: close reader after use
Change-Id: Icd9df821edb668c5521732396b7d6be3b8e75c7a
This commit is contained in:
parent
0b66d22be4
commit
5c744d7ed4
@ -798,6 +798,10 @@ func (access storedPieceAccess) CreationTime(ctx context.Context) (cTime time.Ti
|
||||
if err != nil {
|
||||
return time.Time{}, err
|
||||
}
|
||||
defer func() {
|
||||
err = errs.Combine(err, reader.Close())
|
||||
}()
|
||||
|
||||
header, err := reader.GetPieceHeader()
|
||||
if err != nil {
|
||||
return time.Time{}, err
|
||||
|
Loading…
Reference in New Issue
Block a user