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

fix potential goroutine leak by making channel non-blocking
This commit is contained in:
Tianon Gravi 2021-12-01 17:35:30 -08:00 committed by GitHub
commit cf811b1122
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {