diff options
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r-- | libpod/container_internal.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go index b1b7a090f..76de37a09 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -275,7 +275,7 @@ func (c *Container) syncContainer() error { // Only save back to DB if state changed if c.state.State != oldState { // Check for a restart policy match - if c.config.RestartPolicy != "" && c.config.RestartPolicy != "no" && + if c.config.RestartPolicy != RestartPolicyNone && c.config.RestartPolicy != RestartPolicyNo && (oldState == ContainerStateRunning || oldState == ContainerStatePaused) && (c.state.State == ContainerStateStopped || c.state.State == ContainerStateExited) && !c.state.StoppedByUser { |