]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: cli: use global.maxsock and not maxfd to list all FDs
authorWilly Tarreau <w@1wt.eu>
Mon, 29 Jan 2018 14:17:05 +0000 (15:17 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 29 Jan 2018 14:18:54 +0000 (15:18 +0100)
The "show fd" command on the CLI doesn't list the last FD in use since
it doesn't include maxfd. We don't need to use maxfd here anyway as
global.maxsock will do the job pretty well and removes this dependency.
This patch may be backported to 1.8.

src/cli.c

index d5c615bb1b97f00e641ba7e5b00c18bb750e8aa0..cff59f28ac49a5ef7a017feaf182f292e268c9f8 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -772,7 +772,7 @@ static int cli_io_handler_show_fd(struct appctx *appctx)
        /* we have two inner loops here, one for the proxy, the other one for
         * the buffer.
         */
-       while (fd < maxfd) {
+       while (fd < global.maxsock) {
                struct fdtab fdt;
                struct listener *li = NULL;
                struct server *sv = NULL;