Merge pull request #1396 from harche/cstate
Set container state only once during start
This commit is contained in:
commit
97db1eaad9
|
@ -263,9 +263,6 @@ func (c *linuxContainer) start(process *Process, isInit bool) error {
|
|||
}
|
||||
// generate a timestamp indicating when the container was started
|
||||
c.created = time.Now().UTC()
|
||||
c.state = &runningState{
|
||||
c: c,
|
||||
}
|
||||
if isInit {
|
||||
c.state = &createdState{
|
||||
c: c,
|
||||
|
@ -292,6 +289,10 @@ func (c *linuxContainer) start(process *Process, isInit bool) error {
|
|||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
c.state = &runningState{
|
||||
c: c,
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue