Closed dmcgowan closed 1 year ago
Had to add additional
select {
case <-s.recvClose:
return s.recvErr
default:
}
on receive to replace the err nil check. Since Go does not guarantee select order priority, messages could still be sent after a close was called, causing that test flake. If the receive and close happen at the same time, it isn't important which one wins.
Prevent panic from closing recv channel, which may be written to after close. Use a separate channel to signal recv has closed and check that channel on read and write.
Alternative to #139 for https://github.com/containerd/containerd/issues/8390