BUG/MINOR: hlua/action: incorrect message on E_YIELD error

When hlua_action error messages were reworked in d5b073cf1
("MINOR: lua: Improve error message"), an error was made for the
E_YIELD case.

Indeed, everywhere E_YIELD error is handled: "yield is not allowed" or
similar error message is reported to the user. But instead we currently
have: "aborting Lua processing on expired timeout".

It is quite misleading because this error message often refers to the
HLUA_E_ETMOUT case.

Thus, we now report the proper error message thanks to this patch.

This should be backported to all stable versions.
[on 2.0, the patch needs to be slightly adapted]
This commit is contained in:
Aurelien DARRAGON 2023-08-31 21:45:21 +02:00 committed by Christopher Faulet
parent e7240a0ba6
commit 967608a432

View File

@ -10345,7 +10345,7 @@ static enum act_return hlua_action(struct act_rule *rule, struct proxy *px,
case HLUA_E_YIELD:
err_yield:
act_ret = ACT_RET_CONT;
SEND_ERR(px, "Lua function '%s': aborting Lua processing on expired timeout.\n",
SEND_ERR(px, "Lua function '%s': yield not allowed.\n",
rule->arg.hlua_rule->fcn->name);
goto end;