From 7b57f659178b683176c9611609aa5ced5476091f Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 19 Mar 2019 14:45:08 +0000 Subject: [PATCH] [Minor] Fix coroutine based error handling in lua http --- src/lua/lua_http.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lua/lua_http.c b/src/lua/lua_http.c index bd8404b17..aba23e0dd 100644 --- a/src/lua/lua_http.c +++ b/src/lua/lua_http.c @@ -937,6 +937,10 @@ lua_http_request (lua_State *L) cbd->auth = auth; cbd->task = task; + if (cbd->cbref == -1) { + cbd->thread = lua_thread_pool_get_running_entry (cfg->lua_thread_pool); + } + REF_INIT_RETAIN (cbd, lua_http_cbd_dtor); if (task) { -- 2.39.5