1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

fix potential goroutine leak by making channel non-blocking

Signed-off-by: Shihao Xia <charlesxsh@hotmail.com>
This commit is contained in:
Shihao Xia 2021-08-26 12:57:03 -04:00
parent d12fc17073
commit 6a72e73c1d

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 {