view util/xpcall.lua @ 12513:6efbcd52db21

net.server_epoll: Move call to refresh remote IP address out of wrapper Reduces the side effects of wrapsocket()
author Kim Alvefur <zash@zash.se>
date Fri, 16 Jul 2021 00:56:45 +0200
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;
};