From 967608a4327df8269f72d7b67bdf536c84611dbd Mon Sep 17 00:00:00 2001 From: Aurelien DARRAGON Date: Thu, 31 Aug 2023 21:45:21 +0200 Subject: [PATCH] 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] --- src/hlua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hlua.c b/src/hlua.c index 85bd31610..e418b2d29 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -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;