mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 12:41:00 +02:00
MINOR: hlua: properly handle hlua_process_task HLUA_E_ETMOUT
In hlua_process_task: when HLUA_E_ETMOUT was returned by hlua_ctx_resume(), meaning that the lua task reached tune.lua.task-timeout (default: none), we logged "Lua task: unknown error." before stopping the task. Now we properly handle HLUA_E_ETMOUT to report a meaningful error message.
This commit is contained in:
parent
0ebd41ff50
commit
795441073c
10
src/hlua.c
10
src/hlua.c
@ -8576,16 +8576,16 @@ struct task *hlua_process_task(struct task *task, void *context, unsigned int st
|
||||
break;
|
||||
|
||||
/* finished with error. */
|
||||
case HLUA_E_ETMOUT:
|
||||
SEND_ERR(NULL, "Lua task: execution timeout.\n");
|
||||
goto err_task_abort;
|
||||
case HLUA_E_ERRMSG:
|
||||
SEND_ERR(NULL, "Lua task: %s.\n", lua_tostring(hlua->T, -1));
|
||||
hlua_ctx_destroy(hlua);
|
||||
task_destroy(task);
|
||||
task = NULL;
|
||||
break;
|
||||
|
||||
goto err_task_abort;
|
||||
case HLUA_E_ERR:
|
||||
default:
|
||||
SEND_ERR(NULL, "Lua task: unknown error.\n");
|
||||
err_task_abort:
|
||||
hlua_ctx_destroy(hlua);
|
||||
task_destroy(task);
|
||||
task = NULL;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user