view util/xpcall.lua @ 12878:0d8bf401fa73 0.12

core.sessionmanager: Mark session as destroyed to prevent reentry If it reaches this point, then the session will be most definitely be destroyed, so try to prevent destroy_session() from being called again.
author Kim Alvefur <zash@zash.se>
date Thu, 19 Jan 2023 21:40:09 +0100
parents cfc7b2f7251e
children d10957394a3c
line wrap: on
line source

local xpcall = xpcall;

if select(2, xpcall(function (x) return x end, function () end,  "test")) ~= "test" then
	xpcall = require"util.compat".xpcall;
end

return {
	xpcall = xpcall;
};