aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-03-19 14:45:08 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-03-19 14:45:08 +0000
commit7b57f659178b683176c9611609aa5ced5476091f (patch)
tree39e8fd8659d4b45cdd0193136db4fef1edf2a089 /src/lua
parent438cc41ff70131c73c0c87e7532028684a249555 (diff)
downloadrspamd-7b57f659178b683176c9611609aa5ced5476091f.tar.gz
rspamd-7b57f659178b683176c9611609aa5ced5476091f.zip
[Minor] Fix coroutine based error handling in lua http
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/lua_http.c4
1 files changed, 4 insertions, 0 deletions
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) {