]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: servers: Be more agressive when adding H2 connection to idle lists.
authorOlivier Houchard <ohouchard@haproxy.com>
Fri, 14 Dec 2018 18:31:51 +0000 (19:31 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 15 Dec 2018 22:50:10 +0000 (23:50 +0100)
Add the newly created to the idle list as long as http-reuse != never, and
when completing a H2 request, add the connection to the safe list instead of
the idle list, if we have to add it at that point, that means we created
many streams so we know it's safe.

src/backend.c

index 210cc310024540c5bfaca86dfdae61e4c123f994..64bea0ac1f7b7377df294e0028703ee4db62d1fd 100644 (file)
@@ -1077,7 +1077,7 @@ static int conn_complete_server(struct connection *conn)
        if (conn_install_mux_be(conn, cs, s->sess) < 0)
                goto fail;
        srv = objt_server(s->target);
-       if (srv && ((s->be->options & PR_O_REUSE_MASK) == PR_O_REUSE_ALWS) &&
+       if (srv && ((s->be->options & PR_O_REUSE_MASK) != PR_O_REUSE_NEVR) &&
                            conn->mux->avail_streams(conn) > 0)
                                LIST_ADD(&srv->idle_conns[tid], &conn->list);