Software /
code /
prosody
Diff
plugins/mod_admin_shell.lua @ 10929:ad5e373b1419
mod_admin_shell: Update for async.wait_for rename
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 13 Jun 2020 14:40:41 +0200 |
parent | 10918:b0038e404e0e |
child | 10986:d585deb8c882 |
line wrap: on
line diff
--- a/plugins/mod_admin_shell.lua Sat Jun 13 08:01:57 2020 +0100 +++ b/plugins/mod_admin_shell.lua Sat Jun 13 14:40:41 2020 +0200 @@ -1160,7 +1160,7 @@ local iq = st.iq{ from=localhost, to=remotehost, type="get", id=new_id()} :tag("ping", {xmlns="urn:xmpp:ping"}); local time_start = time.now(); - local ret, err = async.wait(module:context(localhost):send_iq(iq, nil, timeout)); + local ret, err = async.wait_for(module:context(localhost):send_iq(iq, nil, timeout)); if ret then return true, ("pong from %s in %gs"):format(ret.stanza.attr.from, time.now() - time_start); else @@ -1182,7 +1182,7 @@ function def_env.dns:lookup(name, typ, class) local resolver = get_resolver(self.session); - local ret, err = async.wait(resolver:lookup_promise(name, typ, class)); + local ret, err = async.wait_for(resolver:lookup_promise(name, typ, class)); if ret then return true, ret; elseif err then