Ver código fonte

Merge pull request #42574 from charlesxsh/fix-deadlock-1

fix potential goroutine leak by making channel non-blocking
Tianon Gravi 3 anos atrás
pai
commit
cf811b1122
1 arquivos alterados com 1 adições e 1 exclusões
  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.
 	// actually stopped.
 	waitRemove := s.waitRemove
 	waitRemove := s.waitRemove
 
 
-	resultC := make(chan StateStatus)
+	resultC := make(chan StateStatus, 1)
 
 
 	go func() {
 	go func() {
 		select {
 		select {