mirror of
https://github.com/minio/minio.git
synced 2025-11-21 18:26:04 -05:00
Fix cleanup of pipe in GetObjectNInfo handlers (#6509)
This commit is contained in:
committed by
kannappanr
parent
36e51d0cee
commit
3c8fabd116
@@ -211,8 +211,11 @@ func (xl xlObjects) GetObjectNInfo(ctx context.Context, bucket, object string, r
|
||||
err := xl.getObject(ctx, bucket, object, off, length, pw, "", ObjectOptions{})
|
||||
pw.CloseWithError(err)
|
||||
}()
|
||||
// Cleanup function to cause the go routine above to exit, in
|
||||
// case of incomplete read.
|
||||
pipeCloser := func() { pr.Close() }
|
||||
|
||||
return fn(pr, h)
|
||||
return fn(pr, h, pipeCloser)
|
||||
}
|
||||
|
||||
// GetObject - reads an object erasured coded across multiple
|
||||
|
||||
Reference in New Issue
Block a user