]> git.kaiwu.me - haproxy.git/commitdiff
BUG/MINOR: http-client: Convert server timeout ticks when setting it
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 21 Sep 2026 13:54:10 +0000 (15:54 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 21 Sep 2026 13:56:38 +0000 (15:56 +0200)
When the server timeout of an HTTP client instance is set by the caller,
don't forget to convert it to ticks.

This patch could be backported to all supported versions.

src/http_client.c

index df31a11688cae7f472627487a079605d86c09ea2..3f0c0a3d408ceb4e961709f2471425e9b29c3c24 100644 (file)
@@ -265,7 +265,7 @@ int httpclient_req_xfer(struct httpclient *hc, struct ist src, int end)
 /* Set the 'timeout server' in ms for the next httpclient request */
 void httpclient_set_timeout(struct httpclient *hc, int timeout)
 {
-       hc->timeout_server = timeout;
+       hc->timeout_server = MS_TO_TICKS(timeout);
 }
 
 /*