ソースを参照

fix potential goroutine leak by making channel non-blocking
Signed-off-by: Shihao Xia <charlesxsh@hotmail.com>

Shihao Xia 3 年 前
コミット
6a72e73c1d
1 ファイル変更1 行追加1 行削除
  1. 1 1
      container/state.go

+ 1 - 1
container/state.go

@@ -207,7 +207,7 @@ func (s *State) Wait(ctx context.Context, condition WaitCondition) <-chan StateS
 	// actually stopped.
 	waitRemove := s.waitRemove
 
-	resultC := make(chan StateStatus)
+	resultC := make(chan StateStatus, 1)
 
 	go func() {
 		select {