| 743 | } |
| 744 | |
| 745 | void |
| 746 | ts_lua_destroy_vconn_ctx(ts_lua_vconn_ctx *vconn_ctx) |
| 747 | { |
| 748 | // update thread stats |
| 749 | ts_lua_main_ctx *const main_ctx = vconn_ctx->mctx; |
| 750 | ts_lua_ctx_stats *const stats = main_ctx->stats; |
| 751 | |
| 752 | TSMutexLock(stats->mutexp); |
| 753 | --stats->threads; |
| 754 | TSMutexUnlock(stats->mutexp); |
| 755 | |
| 756 | if (vconn_ctx->lua) { |
| 757 | luaL_unref(vconn_ctx->lua, LUA_REGISTRYINDEX, vconn_ctx->ref); |
| 758 | } |
| 759 | |
| 760 | TSfree(vconn_ctx); |
| 761 | } |
| 762 | |
| 763 | void |
| 764 | ts_lua_set_http_ctx(lua_State *L, ts_lua_http_ctx *ctx) |
no test coverage detected