File

util/xpcall.lua @ 12887:68df46926c26 0.12

mod_admin_socket: Return error on unhandled input to prevent apparent freeze When mod_admin_socket is loaded without mod_admin_shell, attempt to use `prosodyctl shell` will appear to freeze after any input, since no response is returned.
author Kim Alvefur <zash@zash.se>
date Thu, 16 Feb 2023 17:20:09 +0100
parent 9561:cfc7b2f7251e
child 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"util.compat".xpcall;
end

return {
	xpcall = xpcall;
};