From: Vsevolod Stakhov Date: Tue, 19 Mar 2019 14:45:08 +0000 (+0000) Subject: [Minor] Fix coroutine based error handling in lua http X-Git-Tag: 1.9.1~81 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7b57f659178b683176c9611609aa5ced5476091f;p=thirdparty%2Frspamd.git [Minor] Fix coroutine based error handling in lua http --- diff --git a/src/lua/lua_http.c b/src/lua/lua_http.c index bd8404b179..aba23e0dda 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) {