Make ply_fd_has_data return false on hangups

This commit is contained in:
Ray Strode 2007-05-16 17:43:20 -04:00
parent 73879cdf3c
commit 73ec13dacb

View file

@ -83,7 +83,9 @@ ply_fd_has_data (int fd)
poll_data.revents = 0;
result = poll (&poll_data, 1, 10);
return result == 1;
return result == 1
&& ((poll_data.revents & POLLIN)
|| (poll_data.revents & POLLPRI));
}
bool