When POCO_HAVE_FD_POLL is defined, the Poco::Net::Socket::select implementation contains two bugs:
- It never initializes the memory it uses for the
pollfd array to pass to ::poll, and so the events bitfield can contain events that the caller isn't interested in, such as the POLLOUT events on a socket which is only in the readList. This can cause ::poll to return prematurely (or even immediately), when a socket is e.g. writeable, but still doesn't match the conditions requested, e.g. readable. This means a loop calling Poco::Net::Socket::select effectively goes into a tight loop.
- The
remainingTime timespan is not used when calling ::poll
About to submit a PR to fix both.