From 73ec13dacbad0468269dc0e7a6a1d1fce7fb3a08 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 16 May 2007 17:43:20 -0400 Subject: [PATCH] Make ply_fd_has_data return false on hangups --- src/ply-utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ply-utils.c b/src/ply-utils.c index b793c614..4605114b 100644 --- a/src/ply-utils.c +++ b/src/ply-utils.c @@ -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