]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
Revert "MINOR: cli: emit a warning when _getsocks was used more than once"
authorWilliam Lallemand <wlallemand@haproxy.org>
Wed, 27 Jul 2022 11:55:54 +0000 (13:55 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Wed, 27 Jul 2022 11:55:54 +0000 (13:55 +0200)
This reverts commit 519cd2021bda11231d461f5974b4e321d0b4eb29.

This was reverted because it's still useful to have access to _getsosks
when the previous reload failed.

src/cli.c

index 9b1625f955f7778186376be8f003e490eeea5329..4724ba4f6b3f117abed4e90cc4702e731d5044eb 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -1981,7 +1981,6 @@ static int bind_parse_severity_output(char **args, int cur_arg, struct proxy *px
 /* Send all the bound sockets, always returns 1 */
 static int _getsocks(char **args, char *payload, struct appctx *appctx, void *private)
 {
-       static int already_sent = 0;
        char *cmsgbuf = NULL;
        unsigned char *tmpbuf = NULL;
        struct cmsghdr *cmsg;
@@ -2009,11 +2008,6 @@ static int _getsocks(char **args, char *payload, struct appctx *appctx, void *pr
 
        fd = remote->handle.fd;
 
-       if (already_sent) {
-               ha_warning("_getsocks: attempt to get sockets but they were already sent!\n");
-               goto out;
-       }
-
        /* Temporary set the FD in blocking mode, that will make our life easier */
        old_fcntl = fcntl(fd, F_GETFL);
        if (old_fcntl < 0) {
@@ -2150,8 +2144,6 @@ static int _getsocks(char **args, char *payload, struct appctx *appctx, void *pr
                }
        }
 
-       already_sent = 1;
-
        /* flush pending stuff */
        if (nb_queued) {
                iov.iov_len = curoff;