1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Fix write after close on http response

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
Derek McGowan 2015-01-21 09:44:24 -08:00 committed by Stephen J Day
parent f1bc0376b8
commit 12d83e727d
2 changed files with 2 additions and 1 deletions

View file

@ -111,6 +111,7 @@ func (o *Output) Close() error {
}
}
o.tasks.Wait()
o.dests = nil
return firstErr
}

View file

@ -226,7 +226,7 @@ func (r *Session) PutV2ImageBlob(ep *Endpoint, imageName, sumType, sumStr string
method := "PUT"
log.Debugf("[registry] Calling %q %s", method, location)
req, err = r.reqFactory.NewRequest(method, location, blobRdr)
req, err = r.reqFactory.NewRequest(method, location, ioutil.NopCloser(blobRdr))
if err != nil {
return err
}