for {
msgs, from, err := s.Receive()
if err != nil {
if err == syscall.EAGAIN {
continue
}
if cberr != nil {
cberr(fmt.Errorf("Receive failed: %v",
err))
if the socket baking s is changed to non blocking mode as the commit 916f9685fa42fc711f76a7f48d058e2656f7edf6 did, when there is no event in the socket, kernel will always return EAGAIN which cause the goroutine to a busy loop.
in the following code snippets
if the socket baking s is changed to non blocking mode as the commit 916f9685fa42fc711f76a7f48d058e2656f7edf6 did, when there is no event in the socket, kernel will always return EAGAIN which cause the goroutine to a busy loop.