Merge pull request #46764 from cpuguy83/fix_probe_interval

Fix case where health start interval is 0 uses default
This commit is contained in:
Sebastiaan van Stijn 2023-11-03 08:32:55 +01:00 committed by GitHub
commit 5baf486545
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -248,7 +248,7 @@ func handleProbeResult(d *Daemon, c *container.Container, result *types.Healthch
// There is never more than one monitor thread running per container at a time.
func monitor(d *Daemon, c *container.Container, stop chan struct{}, probe probe) {
probeInterval := timeoutWithDefault(c.Config.Healthcheck.Interval, defaultProbeInterval)
startInterval := timeoutWithDefault(c.Config.Healthcheck.StartInterval, defaultProbeInterval)
startInterval := timeoutWithDefault(c.Config.Healthcheck.StartInterval, probeInterval)
startPeriod := timeoutWithDefault(c.Config.Healthcheck.StartPeriod, defaultStartPeriod)
c.Lock()