From 6a72e73c1d9f991c2f3da5199b8ad221c3668515 Mon Sep 17 00:00:00 2001 From: Shihao Xia Date: Thu, 26 Aug 2021 12:57:03 -0400 Subject: [PATCH] fix potential goroutine leak by making channel non-blocking Signed-off-by: Shihao Xia --- container/state.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container/state.go b/container/state.go index 11f8e48283..fe2b060d72 100644 --- a/container/state.go +++ b/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 {