when `cli.post(...)` fails `errC <- err` blocks because `errC` is unbufferd.
Signed-off-by: Simon Menke <simon.menke@gmail.com>
... | ... |
@@ -31,7 +31,7 @@ func (cli *Client) ContainerWait(ctx context.Context, containerID string, condit |
31 | 31 |
} |
32 | 32 |
|
33 | 33 |
resultC := make(chan container.ContainerWaitOKBody) |
34 |
- errC := make(chan error) |
|
34 |
+ errC := make(chan error, 1) |
|
35 | 35 |
|
36 | 36 |
query := url.Values{} |
37 | 37 |
query.Set("condition", string(condition)) |