diff options
-rw-r--r-- | src/lua/lua_http.c | 4 |
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) { |