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

Windows: fix error-type for starting a running container

Trying to start a container that is already running is not an
error condition, so a `304 Not Modified` should be returned instead
of a `409 Conflict`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2019-05-22 13:27:55 +02:00
parent 12b837e474
commit c030885e7a
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -607,7 +607,7 @@ func (c *client) Start(_ context.Context, id, _ string, withStdin bool, attachSt
case ctr == nil:
return -1, errors.WithStack(errdefs.NotFound(errors.New("no such container")))
case ctr.init != nil:
return -1, errors.WithStack(errdefs.Conflict(errors.New("container already started")))
return -1, errors.WithStack(errdefs.NotModified(errors.New("container already started")))
}
logger := c.logger.WithField("container", id)