mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +02:00
BUG/MEDIUM: lua: don't reset undesired flags in hlua_ctx_resume
Some flags like HLUA_MUST_GC must not be cleared otherwise sessions are not properly cleaned.
This commit is contained in:
parent
acc980036f
commit
2f3867f429
@ -1034,8 +1034,6 @@ static enum hlua_exec hlua_ctx_resume(struct hlua *lua, int yield_allowed)
|
|||||||
int ret;
|
int ret;
|
||||||
const char *msg;
|
const char *msg;
|
||||||
|
|
||||||
HLUA_SET_RUN(lua);
|
|
||||||
|
|
||||||
/* If we want to resume the task, then check first the execution timeout.
|
/* If we want to resume the task, then check first the execution timeout.
|
||||||
* if it is reached, we can interrupt the Lua processing.
|
* if it is reached, we can interrupt the Lua processing.
|
||||||
*/
|
*/
|
||||||
@ -1050,7 +1048,10 @@ resume_execution:
|
|||||||
lua_sethook(lua->T, hlua_hook, LUA_MASKCOUNT, hlua_nb_instruction);
|
lua_sethook(lua->T, hlua_hook, LUA_MASKCOUNT, hlua_nb_instruction);
|
||||||
|
|
||||||
/* Remove all flags except the running flags. */
|
/* Remove all flags except the running flags. */
|
||||||
lua->flags = HLUA_RUN;
|
HLUA_SET_RUN(lua);
|
||||||
|
HLUA_CLR_CTRLYIELD(lua);
|
||||||
|
HLUA_CLR_WAKERESWR(lua);
|
||||||
|
HLUA_CLR_WAKEREQWR(lua);
|
||||||
|
|
||||||
/* Call the function. */
|
/* Call the function. */
|
||||||
ret = lua_resume(lua->T, gL.T, lua->nargs);
|
ret = lua_resume(lua->T, gL.T, lua->nargs);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user