diff options
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/container.go | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/libpod/container.go b/libpod/container.go index 7b0852c07..226985d9f 100644 --- a/libpod/container.go +++ b/libpod/container.go @@ -823,10 +823,7 @@ func (c *Container) Start() error { logrus.Debugf("Started container %s", c.ID()) - // Update container's state as it should be ContainerStateRunning now - if err := c.runtime.ociRuntime.updateContainerStatus(c); err != nil { - return err - } + c.state.State = ContainerStateRunning return c.save() } @@ -1030,10 +1027,7 @@ func (c *Container) Pause() error { logrus.Debugf("Paused container %s", c.ID()) - // Update container's state as it should be ContainerStatePaused now - if err := c.runtime.ociRuntime.updateContainerStatus(c); err != nil { - return err - } + c.state.State = ContainerStatePaused return c.save() } @@ -1058,10 +1052,7 @@ func (c *Container) Unpause() error { logrus.Debugf("Unpaused container %s", c.ID()) - // Update container's state as it should be ContainerStateRunning now - if err := c.runtime.ociRuntime.updateContainerStatus(c); err != nil { - return err - } + c.state.State = ContainerStateRunning return c.save() } |