From: Christopher Faulet Date: Fri, 10 Jul 2026 09:49:32 +0000 (+0200) Subject: BUG/MINOR: hlua: Apply socket timeout on server side only X-Git-Url: http://git.kaiwu.me/http/doc/static/gitweb.js?a=commitdiff_plain;h=55a1bb9e09a2cef900e4a87398719754babddf03;p=haproxy.git BUG/MINOR: hlua: Apply socket timeout on server side only In lua, the timeout that can be set on an Socket applet was applied on client side and server side. In fact, it must only be applied on server side, to apply a timeout on the connection. The client side is the applet. This patch should fix the issue #3442. It must be backported to all supported versions. --- diff --git a/src/hlua.c b/src/hlua.c index c50fb20b1..38f82182e 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -2744,7 +2744,6 @@ static int hlua_socket_init(struct appctx *appctx) if (csk_ctx->timeout) { s->sess->fe->timeout.connect = csk_ctx->timeout; - s->scf->ioto = csk_ctx->timeout; s->scb->ioto = csk_ctx->timeout; } @@ -3722,7 +3721,6 @@ __LJMP static int hlua_socket_settimeout(struct lua_State *L) s = appctx_strm(csk_ctx->appctx); s->sess->fe->timeout.connect = tmout; - s->scf->ioto = tmout; s->scb->ioto = tmout; s->task->expire = (tick_is_expired(s->task->expire, now_ms) ? 0 : s->task->expire);