]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: backend: Don't release SI endpoint anymore in connect_server()
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 1 Jun 2021 13:54:49 +0000 (15:54 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 1 Jun 2021 13:54:50 +0000 (15:54 +0200)
Thanks to the previous patch (822decfd "BUG/MAJOR: stream-int: Release SI
endpoint on server side ASAP on retry"), it is now useless to release any
existing connection in connect_server() because it was already done in
back_handle_st_cer() if necessary.

This patch is not a CLEANUP because it may introduce some bugs in edge
cases. There is no reason to backport it for now except if it is required to
fix a bug.

src/backend.c

index 0f6b9db3a6e977dad72ede1f45dee2271ad35d7a..65beb84b76a7599be16d7bb5104b6812a8a60023 100644 (file)
@@ -1334,11 +1334,6 @@ int connect_server(struct stream *s)
 
        hash = conn_calculate_hash(&hash_params);
 
-       /* This will catch some corner cases such as lying connections resulting from
-        * retries or connect timeouts but will rarely trigger.
-        */
-       si_release_endpoint(&s->si[1]);
-
        /* do not reuse if mode is not http */
        if (!IS_HTX_STRM(s))
                goto skip_reuse;