mirror of
https://github.com/clearlinux/docker.git
synced 2026-10-04 15:58:39 +00:00
Merge pull request #11967 from LK4D4/fix_panic
Avoid ServeApi race condition
This commit is contained in:
@@ -32,7 +32,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
activationLock chan struct{}
|
||||
activationLock chan struct{} = make(chan struct{})
|
||||
)
|
||||
|
||||
type HttpServer struct {
|
||||
@@ -1445,7 +1445,6 @@ func ServeApi(job *engine.Job) error {
|
||||
protoAddrs = job.Args
|
||||
chErrors = make(chan error, len(protoAddrs))
|
||||
)
|
||||
activationLock = make(chan struct{})
|
||||
|
||||
for _, protoAddr := range protoAddrs {
|
||||
protoAddrParts := strings.SplitN(protoAddr, "://", 2)
|
||||
|
||||
Reference in New Issue
Block a user