diff --git a/api/server/server_linux.go b/api/server/server_linux.go index fff803dda..a9311573d 100644 --- a/api/server/server_linux.go +++ b/api/server/server_linux.go @@ -95,7 +95,9 @@ func AcceptConnections(job *engine.Job) engine.Status { go systemd.SdNotify("READY=1") // close the lock so the listeners start accepting connections - if activationLock != nil { + select { + case <-activationLock: + default: close(activationLock) }