Merge pull request #1877 from spacexnice/master

function copyContent() cause socket leak.
This commit is contained in:
Richard Scothern 2016-08-02 09:15:23 -07:00 committed by GitHub
commit bfa0a9c097

View file

@ -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