Mercurial > prosody-hg
view util/xpcall.lua @ 10620:09d98cd38fe2
mod_admin_telnet: Use promise based DNS resolving
Mostly done for testing this new API
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 24 Jan 2020 23:29:14 +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; };
