BUG/MEDIUM: hlua: Report to SC when output data are blocked on a lua socket
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 18 Jul 2025 14:09:20 +0000 (16:09 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 1 Oct 2025 13:40:51 +0000 (15:40 +0200)
commit3597a6f396dcdd5fb011cf7aba5c03d156c12d86
treeb9774e9bfb03952c52279d19e4c3d3656ae32357
parent025e9ff05d093063fc7dbf20c01b77516237cf8e
BUG/MEDIUM: hlua: Report to SC when output data are blocked on a lua socket

It is a fix similar to the previous one ("BUG/MEDIUM: hlua: Report to SC
when data were consumed on a lua socket"), but for the write side. The
writer must notify the cosocket it needs more space in the request buffer to
produce more data by calling sc_need_room(). Otherwise, there is nothing to
prevent to wake the cosocket applet up again and again.

This patch must be backported as far as 2.8, and maybe to 2.6 too.

(cherry picked from commit 7e96ff6b84b7d7e0805a9a4e87a0a85b6b976df8)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit 839755b1d401928df89b4fd8b146a20a17e28a3d)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 503d60bac653237d618ecb21c468d65855473484)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/hlua.c