fix progressbar in docker push

This commit is contained in:
Victor Vieux 2013-12-19 12:32:58 -08:00
parent cea40c552b
commit 10eeaec70c

View File

@ -448,6 +448,11 @@ func (r *Registry) PushImageLayerRegistry(imgID string, layer io.Reader, registr
if err != nil {
return "", fmt.Errorf("Failed to upload layer: %s", err)
}
if rc, ok := layer.(io.Closer); ok {
if err := rc.Close(); err != nil {
return "", err
}
}
defer res.Body.Close()
if res.StatusCode != 200 {