From: Willy Tarreau Date: Thu, 6 Dec 2018 14:29:50 +0000 (+0100) Subject: BUG/MEDIUM: lua: block on remote connection establishment X-Git-Tag: v1.9-dev10~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=12c24235ca05b4d397c70db65a36ed96d3e5f1d7;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: lua: block on remote connection establishment We used to wait for the other side to be connected, but the blocking flags were inaccurate. It used to work fine almost by accident before the stream interface changes. Now we use the new RXBLK_CONN flag to explicitly subscribe to this event. Thanks to Adis for reporting the issue, PiBaNL for the test case, and Olivier for the diagnostic. No backport is needed. --- diff --git a/src/hlua.c b/src/hlua.c index 0e105059de..189bf475ad 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -1616,6 +1616,7 @@ static void hlua_socket_handler(struct appctx *appctx) */ if (!(c->flags & CO_FL_CONNECTED)) { si_cant_get(si); + si_rx_conn_blk(si); si_rx_endp_more(si); return; }