]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] checks: make shutdown() silently fail
authorWilly Tarreau <w@1wt.eu>
Tue, 16 Mar 2010 19:57:57 +0000 (20:57 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 16 Mar 2010 21:57:27 +0000 (22:57 +0100)
Shutdown may fail for instance after an RST. So we must not report
any error for that.

src/checks.c

index f808db0ba65b319f4ca965fd10b1d8a74beff2d3..82939dc76f17045788a2c5aeea4d9b0490322915 100644 (file)
@@ -917,11 +917,7 @@ static int event_srv_chk_r(int fd)
                s->check_data[s->check_data_len - 1] = '\0';
 
        /* Close the connection... */
-       int shut = shutdown(fd, SHUT_RDWR);
-       int err = errno;
-       if (shut == -1) {
-               Alert("event_srv_chk_r(): err = %i, %s\n", err, strerror(err));
-       }
+       shutdown(fd, SHUT_RDWR);
 
        /* Run the checks... */
        if (s->proxy->options & PR_O_HTTP_CHK) {