mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-04 04:31:28 +00:00
Merge pull request #11967 from LK4D4/fix_panic
Avoid ServeApi race condition
This commit is contained in:
@@ -82,7 +82,9 @@ func AcceptConnections(job *engine.Job) error {
|
||||
// Tell the init daemon we are accepting requests
|
||||
go systemd.SdNotify("READY=1")
|
||||
// close the lock so the listeners start accepting connections
|
||||
if activationLock != nil {
|
||||
select {
|
||||
case <-activationLock:
|
||||
default:
|
||||
close(activationLock)
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user