]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
DEV: tcploop: do not report an error on POLLERR
authorWilly Tarreau <w@1wt.eu>
Fri, 25 Nov 2022 16:04:05 +0000 (17:04 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 25 Nov 2022 16:07:22 +0000 (17:07 +0100)
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.

dev/tcploop/tcploop.c

index 9956835a9cc8dfea8b7cb2d4997f062b99759b80..e87525887e01185c32345b2c74e80f4d6d25253c 100644 (file)
@@ -306,7 +306,7 @@ int addr_to_ss(const char *str, struct sockaddr_storage *ss, struct err_msg *err
 }
 
 /* waits up to <ms> milliseconds on fd <fd> for events <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;
 }