Allow switch to anything from nullState

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2016-01-21 16:48:05 -08:00
parent 556f798a19
commit 9c3fa7928e
2 changed files with 4 additions and 6 deletions
+3
View File
@@ -203,6 +203,9 @@ func (l *LinuxFactory) Load(id string) (Container, error) {
root: containerRoot,
}
c.state = &nullState{c: c}
if err := c.refreshState(); err != nil {
return nil, err
}
return c, nil
}
+1 -6
View File
@@ -214,12 +214,7 @@ func (n *nullState) status() Status {
}
func (n *nullState) transition(s containerState) error {
switch s.(type) {
case *restoredState:
n.c.state = s
default:
// do nothing for null states
}
n.c.state = s
return nil
}