X-Git-Url: https://ruderich.org/simon/gitweb/?p=tlsproxy%2Ftlsproxy.git;a=blobdiff_plain;f=lib%2Ftlsproxyhelper.c;fp=lib%2Ftlsproxyhelper.c;h=53dc9e8e0b9b4e81cc38c2abb1e66d5aa38d7b9c;hp=68dcbb56e421cbc03490b299371777dae02ba69c;hb=418f9d30e80201a64b9b9dd0f85616a6186cb15c;hpb=47779cdadbff9f9f7848828c97bf1dc63c3cb08f 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; }