1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

integration/internal/container: fix a goroutine leak bug by adding 1 buffer

Signed-off-by: Ziheng Liu <lzhfromustc@gmail.com>
This commit is contained in:
Ziheng Liu 2019-10-27 20:22:52 -04:00
parent a09e6e323e
commit 6233217a31

View file

@ -57,7 +57,7 @@ func Exec(ctx context.Context, cli client.APIClient, id string, cmd []string) (E
// read the output // read the output
var outBuf, errBuf bytes.Buffer var outBuf, errBuf bytes.Buffer
outputDone := make(chan error) outputDone := make(chan error, 1)
go func() { go func() {
// StdCopy demultiplexes the stream into two buffers // StdCopy demultiplexes the stream into two buffers