diff --git a/core/remotes/docker/pusher.go b/core/remotes/docker/pusher.go index 128d2fd03..f994fff5a 100644 --- a/core/remotes/docker/pusher.go +++ b/core/remotes/docker/pusher.go @@ -297,6 +297,7 @@ func (p dockerPusher) push(ctx context.Context, desc ocispec.Descriptor, ref str err := remoteserrors.NewUnexpectedStatusErr(resp) log.G(ctx).WithField("resp", resp).WithField("body", string(err.(remoteserrors.ErrUnexpectedStatus).Body)).Debug("unexpected response") pushw.setError(err) + return } pushw.setResponse(resp) }() @@ -432,6 +433,8 @@ func (pw *pushWriter) Write(p []byte) (n int, err error) { pw.Close() case p := <-pw.pipeC: return 0, pw.replacePipe(p) + case resp := <-pw.respC: + pw.setResponse(resp) } } status.Offset += int64(n)