mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-23 15:19:36 -04: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
1 changed files with 5 additions and 5 deletions
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…
Reference in a new issue