]> ruderich.org/simon Gitweb - tlsproxy/tlsproxy.git/blobdiff - lib/tlsproxyhelper.c
tlsproxyhelper.c: Split POLLERR and POLLHUP check.
[tlsproxy/tlsproxy.git] / lib / tlsproxyhelper.c
index 68dcbb56e421cbc03490b299371777dae02ba69c..53dc9e8e0b9b4e81cc38c2abb1e66d5aa38d7b9c 100644 (file)
@@ -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;
     }