if (hdl->type == LUA_WANT_READ) {
if (hdl->h.r.cbref && hdl->h.r.cbref != -1) {
- luaL_unref (cbd->task->cfg->lua_state, LUA_REGISTRYINDEX, hdl->h.r.cbref);
+ luaL_unref (cbd->cfg->lua_state, LUA_REGISTRYINDEX, hdl->h.r.cbref);
}
if (hdl->h.r.stop_pattern) {
}
else if (hdl->type == LUA_WANT_WRITE) {
if (hdl->h.w.cbref && hdl->h.w.cbref != -1) {
- luaL_unref (cbd->task->cfg->lua_state, LUA_REGISTRYINDEX, hdl->h.w.cbref);
+ luaL_unref (cbd->cfg->lua_state, LUA_REGISTRYINDEX, hdl->h.w.cbref);
}
if (hdl->h.w.iov) {
msg_debug_tcp ("finishing TCP %s connection", IS_SYNC (cbd) ? "sync" : "async");
if (cbd->connect_cb != -1) {
- luaL_unref (cbd->task->cfg->lua_state, LUA_REGISTRYINDEX, cbd->connect_cb);
+ luaL_unref (cbd->cfg->lua_state, LUA_REGISTRYINDEX, cbd->connect_cb);
}
if (cbd->fd != -1) {
return;
}
- lua_thread_pool_prepare_callback (cbd->task->cfg->lua_thread_pool, &cbs);
+ lua_thread_pool_prepare_callback (cbd->cfg->lua_thread_pool, &cbs);
L = cbs.L;
hdl = g_queue_peek_head (cbd->handlers);
cbd->flags |= LUA_TCP_FLAG_CONNECTED;
if (cbd->connect_cb != -1) {
- lua_thread_pool_prepare_callback (cbd->task->cfg->lua_thread_pool, &cbs);
+ lua_thread_pool_prepare_callback (cbd->cfg->lua_thread_pool, &cbs);
L = cbs.L;
struct lua_tcp_cbdata **pcbd;