mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Reset health status to starting when a container is restarted
Signed-off-by: Thomas Leonard <thomas.leonard@docker.com>
This commit is contained in:
parent
66177532b6
commit
b8793cff48
1 changed files with 4 additions and 1 deletions
|
@ -251,7 +251,10 @@ func (d *Daemon) initHealthMonitor(c *container.Container) {
|
|||
// This is needed in case we're auto-restarting
|
||||
d.stopHealthchecks(c)
|
||||
|
||||
if c.State.Health == nil {
|
||||
if h := c.State.Health; h != nil {
|
||||
h.Status = types.Starting
|
||||
h.FailingStreak = 0
|
||||
} else {
|
||||
h := &container.Health{}
|
||||
h.Status = types.Starting
|
||||
c.State.Health = h
|
||||
|
|
Loading…
Reference in a new issue