From: Willy Tarreau Date: Fri, 25 Nov 2022 16:04:05 +0000 (+0100) Subject: DEV: tcploop: do not report an error on POLLERR X-Git-Tag: v2.7.0~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd0974cf3f4b1548d8ea261b6d76c14b8c94e6ab;p=thirdparty%2Fhaproxy.git DEV: tcploop: do not report an error on POLLERR Actually this breaks certain client tests where the server closes with RST, it prevents from reading the final data so better not abort on that. --- diff --git a/dev/tcploop/tcploop.c b/dev/tcploop/tcploop.c index 9956835a9c..e87525887e 100644 --- a/dev/tcploop/tcploop.c +++ b/dev/tcploop/tcploop.c @@ -306,7 +306,7 @@ int addr_to_ss(const char *str, struct sockaddr_storage *ss, struct err_msg *err } /* waits up to milliseconds on fd for events (POLLIN|POLLRDHUP|POLLOUT). - * returns poll's status, or -2 if the poller sets POLLERR. + * returns poll's status. */ int wait_on_fd(int fd, int events, int ms) { @@ -319,8 +319,6 @@ int wait_on_fd(int fd, int events, int ms) ret = poll(&pollfd, 1, ms); } while (ret == -1 && errno == EINTR); - if (ret == 1 && pollfd.revents & POLLERR) - ret = -2; return ret; }