File

util/xpcall.lua @ 13659:5abdcad8c2e0

net.adns: Collect DNS lookup timing metrics Nice to have this in OpenMetricts instead of debug logs
author Kim Alvefur <zash@zash.se>
date Fri, 07 Feb 2025 09:22:52 +0100
parent 12975: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"prosody.util.compat".xpcall;
end

return {
	xpcall = xpcall;
};