mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-08 08:07:10 +02:00
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:
parent
10e5bc76c7
commit
de70fa17a9
@ -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);
|
bo_skip(oc, len + skip_at_end);
|
||||||
|
|
||||||
/* Don't wait anything. */
|
/* 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
|
/* If the pattern reclaim to read all the data
|
||||||
* in the connection, got out.
|
* 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. */
|
/* 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->req.rex = TICK_ETERNITY;
|
||||||
socket->s->res.wex = TICK_ETERNITY;
|
socket->s->res.wex = TICK_ETERNITY;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user