MCPcopy Create free account
hub / github.com/apache/trafficserver / ts_lua_destroy_vconn_ctx

Function ts_lua_destroy_vconn_ctx

plugins/lua/ts_lua_util.cc:745–761  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

743}
744
745void
746ts_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
763void
764ts_lua_set_http_ctx(lua_State *L, ts_lua_http_ctx *ctx)

Callers 2

vconnHookHandlerFunction · 0.85
TSPluginInitFunction · 0.85

Calls 3

TSMutexLockFunction · 0.85
TSMutexUnlockFunction · 0.85
TSfreeFunction · 0.85

Tested by

no test coverage detected