Merge pull request #1877 from spacexnice/master
function copyContent() cause socket leak.
This commit is contained in:
commit
bfa0a9c097
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue