Merge pull request #45798 from thaJeztah/24.0_backport_fix-health-probe-double-unlock

[24.0 backport] daemon: fix double-unlock in health check probe
This commit is contained in:
Bjorn Neergaard 2023-06-22 18:38:06 -06:00 committed by GitHub
commit 575d03df66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -160,7 +160,6 @@ func (p *cmdProbe) run(ctx context.Context, d *Daemon, cntr *container.Container
info.Lock()
defer info.Unlock()
if info.ExitCode == nil {
info.Unlock()
return 0, fmt.Errorf("healthcheck for container %s has no exit code", cntr.ID)
}
return *info.ExitCode, nil