mirror of
https://github.com/clearlinux/docker.git
synced 2026-10-03 23:38:24 +00:00
move acceptconnections as builtin
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
This commit is contained in:
@@ -1285,10 +1285,6 @@ func ServeApi(job *engine.Job) engine.Status {
|
||||
)
|
||||
activationLock = make(chan struct{})
|
||||
|
||||
if err := job.Eng.Register("acceptconnections", AcceptConnections); err != nil {
|
||||
return job.Error(err)
|
||||
}
|
||||
|
||||
for _, protoAddr := range protoAddrs {
|
||||
protoAddrParts := strings.SplitN(protoAddr, "://", 2)
|
||||
if len(protoAddrParts) != 2 {
|
||||
@@ -1315,7 +1311,9 @@ func AcceptConnections(job *engine.Job) engine.Status {
|
||||
go systemd.SdNotify("READY=1")
|
||||
|
||||
// close the lock so the listeners start accepting connections
|
||||
close(activationLock)
|
||||
if activationLock != nil {
|
||||
close(activationLock)
|
||||
}
|
||||
|
||||
return engine.StatusOK
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user