From: Amaury Denoyelle Date: Tue, 21 May 2024 14:35:11 +0000 (+0200) Subject: MINOR: rhttp: add log on connection allocation failure X-Git-Tag: v3.0-dev13~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f80543220910d81ca606835b5193e5638d2b950;p=thirdparty%2Fhaproxy.git MINOR: rhttp: add log on connection allocation failure Add an error log when new_reverse_conn() fails. This may help to diagnose future issues on reverse HTTP. --- diff --git a/src/proto_rhttp.c b/src/proto_rhttp.c index 2f1004cde8..05611e0e53 100644 --- a/src/proto_rhttp.c +++ b/src/proto_rhttp.c @@ -104,6 +104,13 @@ static struct connection *new_reverse_conn(struct listener *l, struct server *sr return conn; err: + if (l->rx.rhttp.state != LI_PRECONN_ST_ERR) { + send_log(l->bind_conf->frontend, LOG_ERR, + "preconnect %s::%s: Error on conn allocation.\n", + l->bind_conf->frontend->id, l->bind_conf->rhttp_srvname); + l->rx.rhttp.state = LI_PRECONN_ST_ERR; + } + if (conn) { conn_stop_tracking(conn); conn_xprt_shutw(conn);