MINOR: lua: use the proper applet wakeup mechanism

The lua code must the the appropriate wakeup mechanism for cosockets.
It wakes them up from outside the stream and outside the applet, so it
shouldn't use the applet's wakeup callback which is designed only for
use from within the applet itself. For now it didn't cause any trouble
(yet).
This commit is contained in:
Willy Tarreau 2015-09-26 11:25:05 +02:00
parent 10e5bc76c7
commit de70fa17a9

View File

@ -1743,7 +1743,8 @@ __LJMP static int hlua_socket_receive_yield(struct lua_State *L, int status, lua
bo_skip(oc, len + skip_at_end);
/* Don't wait anything. */
si_applet_wake_cb(&socket->s->si[0]);
stream_int_notify(&socket->s->si[0]);
stream_int_update_applet(&socket->s->si[0]);
/* If the pattern reclaim to read all the data
* in the connection, got out.
@ -1920,7 +1921,9 @@ static int hlua_socket_write_yield(struct lua_State *L,int status, lua_KContext
}
/* update buffers. */
si_applet_wake_cb(&socket->s->si[0]);
stream_int_notify(&socket->s->si[0]);
stream_int_update_applet(&socket->s->si[0]);
socket->s->req.rex = TICK_ETERNITY;
socket->s->res.wex = TICK_ETERNITY;