From: William Lallemand Date: Thu, 17 Mar 2022 14:24:28 +0000 (+0100) Subject: MEDIUM: httpclient: enable l7-retry X-Git-Tag: v2.6-dev5~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=71abad050a9bd8864ee0a1f37eca1c5d1b5efe2f;p=thirdparty%2Fhaproxy.git MEDIUM: httpclient: enable l7-retry Enable the layer-7 retry in the httpclient. This way the client will retry upon a connection error or a timeout. --- diff --git a/src/http_client.c b/src/http_client.c index c1a5ec551d..f06be65941 100644 --- a/src/http_client.c +++ b/src/http_client.c @@ -999,10 +999,12 @@ static int httpclient_init() proxy_preset_defaults(httpclient_proxy); httpclient_proxy->options |= PR_O_WREQ_BODY; + httpclient_proxy->retry_type |= PR_RE_CONN_FAILED | PR_RE_DISCONNECTED | PR_RE_TIMEOUT; httpclient_proxy->options2 |= PR_O2_INDEPSTR; httpclient_proxy->mode = PR_MODE_HTTP; httpclient_proxy->maxconn = 0; httpclient_proxy->accept = NULL; + httpclient_proxy->conn_retries = CONN_RETRIES; httpclient_proxy->timeout.client = TICK_ETERNITY; /* The HTTP Client use the "option httplog" with the global log server */ httpclient_proxy->conf.logformat_string = default_http_log_format;