Software /
code /
prosody
File
util/xpcall.lua @ 11742:9c450185bac1
mod_c2s,mod_s2s: Fire event just before writes
Could allow e.g. a XEP-0198 implementation to efficiently send ack
requests at optimal times without using timers or nextTick.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 16 Aug 2021 12:45:14 +0200 |
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; };