Move job register into servapi
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
parent
d5e41c1cb6
commit
e743021193
1 changed files with 4 additions and 1 deletions
|
@ -52,7 +52,6 @@ type HttpApiFunc func(eng *engine.Engine, version float64, w http.ResponseWriter
|
|||
|
||||
func init() {
|
||||
engine.Register("serveapi", ServeApi)
|
||||
engine.Register("acceptconnections", AcceptConnections)
|
||||
}
|
||||
|
||||
func hijackServer(w http.ResponseWriter) (io.ReadCloser, io.Writer, error) {
|
||||
|
@ -1211,6 +1210,10 @@ 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)
|
||||
go func() {
|
||||
|
|
Loading…
Add table
Reference in a new issue