]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-h2: don't report a fantom h2s in "show fd"
authorWilly Tarreau <w@1wt.eu>
Tue, 18 Dec 2018 13:34:41 +0000 (14:34 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 18 Dec 2018 13:34:41 +0000 (14:34 +0100)
The h2s pointer was used to scan fctl lists prior to being used to scan
the send list by ID, so it could appear non-null eventhough the list is
empty, resulting in misleading information on empty connections.

No backport is needed.

src/mux_h2.c

index 33510dcab5bf3ff9d65bb53aa4e03f98024b2272..58a052174295285ae72788e0b660c1c34b6d8a49 100644 (file)
@@ -4860,6 +4860,7 @@ static void h2_show_fd(struct buffer *msg, struct connection *conn)
        list_for_each_entry(h2s, &h2c->send_list, list)
                send_cnt++;
 
+       h2s = NULL;
        node = eb32_first(&h2c->streams_by_id);
        while (node) {
                h2s = container_of(node, struct h2s, by_id);