From 12c24235ca05b4d397c70db65a36ed96d3e5f1d7 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 6 Dec 2018 15:29:50 +0100 Subject: [PATCH] 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. --- src/hlua.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hlua.c b/src/hlua.c index 0e105059d..189bf475a 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; }