]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: lua: block on remote connection establishment
authorWilly Tarreau <w@1wt.eu>
Thu, 6 Dec 2018 14:29:50 +0000 (15:29 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 6 Dec 2018 14:29:50 +0000 (15:29 +0100)
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

index 0e105059deeedaa30ff47f343d71d72776c84f24..189bf475ad677da2c65663c7a479f883cd2dc1b2 100644 (file)
@@ -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;
        }