[proxy] fix race condition when waiting for containers to start
If ContainerStarted fired before the response handler, then the "waiter" chan would be nil, and the response handler would hang.
This commit is contained in:
1 parent
a67b9f566a
commit
b86d9bf1ab
1 file changed
+1
-1
+1
-1
@@ -312,7 +312,7 @@ func (proxy *Proxy) waitForStart(r *http.Request) {
|
||||
ch = wait.ch
|
||||
}
|
||||
proxy.Unlock()
|
||||
if found {
|
||||
if ch != nil {
|
||||
Log.Debugf("Wait for start of container %s", wait.ident)
|
||||
<-ch
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user