From 2cc42376bdce1177326fc28a50f34d0efe653eff Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 24 Apr 2015 14:06:27 +1000 Subject: [PATCH] Check also for POLLRDHUP in wait/read write select helpers --- src/libckpool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libckpool.c b/src/libckpool.c index f3d218d1..24c66f10 100644 --- a/src/libckpool.c +++ b/src/libckpool.c @@ -911,7 +911,7 @@ int wait_read_select(int sockd, int timeout) if (unlikely(sockd < 0)) goto out; sfd.fd = sockd; - sfd.events = POLLIN; + sfd.events = POLLIN | POLLRDHUP; sfd.revents = 0; timeout *= 1000; ret = poll(&sfd, 1, timeout); @@ -993,7 +993,7 @@ int wait_write_select(int sockd, int timeout) if (unlikely(sockd < 0)) goto out; sfd.fd = sockd; - sfd.events = POLLOUT; + sfd.events = POLLOUT | POLLRDHUP; sfd.revents = 0; timeout *= 1000; ret = poll(&sfd, 1, timeout);