]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: server: initialize the idle conns list after parsing the config
authorWilly Tarreau <w@1wt.eu>
Thu, 7 Feb 2019 13:46:29 +0000 (14:46 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 7 Feb 2019 14:08:13 +0000 (15:08 +0100)
commit835daa119e75a54689375da9c77e5d0e6bd7362f
tree40cf9ab0f08e7825131942801281412aea187d89
parentb0769b2ed668119e024e2fbda79eef46ece8511a
BUG/MEDIUM: server: initialize the idle conns list after parsing the config

The idle conns lists are sized according to the number of threads. As such
they cannot be initialized during the parsing since nbthread can be set
later, as revealed by this simple config which randomly crashes when used.
Let's do this at the end instead.

    listen proxy
        bind :4445
        mode http
        timeout client 10s
        timeout server 10s
        timeout connect 10s
        http-reuse always
        server s1 127.0.0.1:8000

    global
        nbthread 8

This fix must be backported to 1.9 and 1.8.
src/cfgparse.c
src/server.c