mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-20 00:10:41 -05:00
BUG/MEDIUM: lua: timeout error with converters, wrapper and actions.
test conf:
global
tune.lua.session-timeout 0
lua-load lol.lua
debug
maxconn 4096
listen test
bind 0.0.0.0:10010
mode tcp
tcp-request content lua act_test
balance roundrobin
server test 127.0.0.1:3304
lua test:
function act_test(txn)
while true do
core.Alert("TEST")
end
end
The function "act_test()" is not executed because a zero timeout is not
considered as TICK_ETERNITY, but is considered as 0.
This path fix this behavior. This is the same problem than the bugfix
685c014e99.
This commit is contained in:
parent
f2ee0162c3
commit
61e96c68b9
1 changed files with 3 additions and 3 deletions
|
|
@ -3944,7 +3944,7 @@ static int hlua_sample_conv_wrapper(const struct arg *arg_p, struct sample *smp,
|
|||
}
|
||||
|
||||
/* We must initialize the execution timeouts. */
|
||||
stream->hlua.expire = tick_add(now_ms, hlua_timeout_session);
|
||||
stream->hlua.expire = tick_add_ifset(now_ms, hlua_timeout_session);
|
||||
|
||||
/* Set the currently running flag. */
|
||||
HLUA_SET_RUN(&stream->hlua);
|
||||
|
|
@ -4050,7 +4050,7 @@ static int hlua_sample_fetch_wrapper(const struct arg *arg_p, struct sample *smp
|
|||
}
|
||||
|
||||
/* We must initialize the execution timeouts. */
|
||||
stream->hlua.expire = tick_add(now_ms, hlua_timeout_session);
|
||||
stream->hlua.expire = tick_add_ifset(now_ms, hlua_timeout_session);
|
||||
|
||||
/* Set the currently running flag. */
|
||||
HLUA_SET_RUN(&stream->hlua);
|
||||
|
|
@ -4322,7 +4322,7 @@ static int hlua_request_act_wrapper(struct hlua_rule *rule, struct proxy *px,
|
|||
}
|
||||
|
||||
/* We must initialize the execution timeouts. */
|
||||
s->hlua.expire = tick_add(now_ms, hlua_timeout_session);
|
||||
s->hlua.expire = tick_add_ifset(now_ms, hlua_timeout_session);
|
||||
|
||||
/* Set the currently running flag. */
|
||||
HLUA_SET_RUN(&s->hlua);
|
||||
|
|
|
|||
Loading…
Reference in a new issue