diff options
Diffstat (limited to 'libpod/boltdb_state.go')
-rw-r--r-- | libpod/boltdb_state.go | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/libpod/boltdb_state.go b/libpod/boltdb_state.go index 7880265b6..3ee24122a 100644 --- a/libpod/boltdb_state.go +++ b/libpod/boltdb_state.go @@ -174,15 +174,9 @@ func (s *BoltState) Refresh() error { return errors.Wrapf(err, "error unmarshalling state for container %s", string(id)) } - state.PID = 0 - state.Mountpoint = "" - state.Mounted = false - state.State = ContainerStateConfigured - state.ExecSessions = make(map[string]*ExecSession) - state.IPs = nil - state.Interfaces = nil - state.Routes = nil - state.BindMounts = make(map[string]string) + if err := resetState(state); err != nil { + return errors.Wrapf(err, "error resetting state for container %s", string(id)) + } newStateBytes, err := json.Marshal(state) if err != nil { |