mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #12010 from ibuildthecloud/small
Small changes from #11967 for review comments
This commit is contained in:
commit
e64f6baf11
2 changed files with 6 additions and 4 deletions
|
@ -32,7 +32,7 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
activationLock chan struct{} = make(chan struct{})
|
||||
activationLock = make(chan struct{})
|
||||
)
|
||||
|
||||
type HttpServer struct {
|
||||
|
|
|
@ -39,10 +39,12 @@ func NewServer(proto, addr string, job *engine.Job) (Server, error) {
|
|||
}
|
||||
|
||||
// Called through eng.Job("acceptconnections")
|
||||
func AcceptConnections(job *engine.Job) engine.Status {
|
||||
func AcceptConnections(job *engine.Job) error {
|
||||
// close the lock so the listeners start accepting connections
|
||||
if activationLock != nil {
|
||||
select {
|
||||
case <-activationLock:
|
||||
default:
|
||||
close(activationLock)
|
||||
}
|
||||
return engine.StatusOK
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue