Correct bug in listener not detecting eagain/eintr correctly