From 4d2d2ea39336aade783c5c415b83d129bdd339bb Mon Sep 17 00:00:00 2001 From: Simon Menke Date: Fri, 19 May 2017 08:40:58 +0200 Subject: [PATCH] Remove deadlock in ContainerWait when `cli.post(...)` fails `errC <- err` blocks because `errC` is unbufferd. Signed-off-by: Simon Menke --- client/container_wait.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/container_wait.go b/client/container_wait.go index edfa5d3c85..af4559c4b9 100644 --- a/client/container_wait.go +++ b/client/container_wait.go @@ -31,7 +31,7 @@ func (cli *Client) ContainerWait(ctx context.Context, containerID string, condit } resultC := make(chan container.ContainerWaitOKBody) - errC := make(chan error) + errC := make(chan error, 1) query := url.Values{} query.Set("condition", string(condition))