mirror of
https://github.com/distribution/distribution.git
synced 2025-09-01 06:57:45 +00:00
Merge pull request #1877 from spacexnice/master
function copyContent() cause socket leak.
This commit is contained in:
@@ -55,6 +55,8 @@ func (pbs *proxyBlobStore) copyContent(ctx context.Context, dgst digest.Digest,
|
||||
return distribution.Descriptor{}, err
|
||||
}
|
||||
|
||||
defer remoteReader.Close()
|
||||
|
||||
_, err = io.CopyN(writer, remoteReader, desc.Size)
|
||||
if err != nil {
|
||||
return distribution.Descriptor{}, err
|
||||
|
Reference in New Issue
Block a user