From 418f9d30e80201a64b9b9dd0f85616a6186cb15c Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 3 Nov 2013 06:51:18 +0100 Subject: [PATCH] tlsproxyhelper.c: Split POLLERR and POLLHUP check. --- lib/tlsproxyhelper.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/tlsproxyhelper.c b/lib/tlsproxyhelper.c index 68dcbb5..53dc9e8 100644 --- a/lib/tlsproxyhelper.c +++ b/lib/tlsproxyhelper.c @@ -272,8 +272,12 @@ static int poll_for(int sockfd, int mode) { return -1; } - if (fds[0].revents & POLLERR || fds[0].revents & POLLHUP) { - fprintf(stderr, LOG_PREFIX "poll(): POLLERR | POLLHUP\n"); + if (fds[0].revents & POLLERR) { + fprintf(stderr, LOG_PREFIX "poll(): POLLERR\n"); + return -1; + } + if (fds[0].revents & POLLHUP) { + fprintf(stderr, LOG_PREFIX "poll(): POLLHUP\n"); return -1; } -- 2.45.2