summaryrefslogtreecommitdiff
path: root/libpod/container_internal.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r--libpod/container_internal.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index ce48987f6..0861fbdba 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -1309,8 +1309,9 @@ func (c *Container) stop(timeout uint) error {
if err := c.syncContainer(); err != nil {
switch errors.Cause(err) {
// If the container has already been removed (e.g., via
- // the cleanup process), there's nothing left to do.
+ // the cleanup process), set the container state to "stopped".
case define.ErrNoSuchCtr, define.ErrCtrRemoved:
+ c.state.State = define.ContainerStateStopped
return stopErr
default:
if stopErr != nil {