浏览代码

Merge pull request #40144 from lzhfromustc/GL_outputDone

integration/internal/container: fix a goroutine leak bug
Kirill Kolyshkin 5 年之前
父节点
当前提交
154cf042fd
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      integration/internal/container/exec.go

+ 1 - 1
integration/internal/container/exec.go

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