]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix coroutine based error handling in lua http
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 19 Mar 2019 14:45:08 +0000 (14:45 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 19 Mar 2019 14:45:08 +0000 (14:45 +0000)
src/lua/lua_http.c

index bd8404b17951276c9e146bb87b51838468efd149..aba23e0dda04c605ccac6b1fc92d3ac40fcd2f9c 100644 (file)
@@ -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) {