Actually this breaks certain client tests where the server closes with
RST, it prevents from reading the final data so better not abort on
that.
}
/* waits up to <ms> milliseconds on fd <fd> for events <events> (POLLIN|POLLRDHUP|POLLOUT).
- * returns poll's status, or -2 if the poller sets POLLERR.
+ * returns poll's status.
*/
int wait_on_fd(int fd, int events, int ms)
{
ret = poll(&pollfd, 1, ms);
} while (ret == -1 && errno == EINTR);
- if (ret == 1 && pollfd.revents & POLLERR)
- ret = -2;
return ret;
}