BUG/MEDIUM: lua: wakeup task on bad conditions

the condition was :
 * wakeup for read if the output channel contains data
 * wakeup for write if the input channel have some room.
This commit is contained in:
Thierry FOURNIER 2015-09-26 22:01:07 +02:00 committed by Willy Tarreau
parent 5a50a85f4f
commit eba6f64a5f

View File

@ -1582,11 +1582,11 @@ static void hlua_socket_handler(struct appctx *appctx)
appctx->ctx.hlua.connected = 1;
/* Wake the tasks which wants to write if the buffer have avalaible space. */
if (channel_may_recv(si_oc(si)))
if (channel_may_recv(si_ic(si)))
hlua_com_wake(&appctx->ctx.hlua.wake_on_write);
/* Wake the tasks which wants to read if the buffer contains data. */
if (channel_is_empty(si_ic(si)))
if (!channel_is_empty(si_oc(si)))
hlua_com_wake(&appctx->ctx.hlua.wake_on_read);
}