linux – Why STRACE shows EAGAIN (Resource temporarily unavailable)
poll woke up with
revents = POLLOUT, which means that the socket is ready to write, not ready to read. The code is apparently not checking this flag, and trying to read anyway.
This might be intentional. Even though
poll didnt say the socket is ready to read, it might have become ready while it was writing. So it calls ready just in case something has shown up. If not, it will go back into
poll to wait again. This allows it to process incoming data more quickly, since it can get it in one call rather than two.