Software /
code /
prosody
Comparison
plugins/mod_admin_shell.lua @ 11954:b963ac00c967
mod_admin_shell: Remove now redundant promise awaiting in dns:lookup()
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 27 Nov 2021 14:16:13 +0100 |
parent | 11953:848a522fd731 |
child | 11991:bef2a59b00d1 |
comparison
equal
deleted
inserted
replaced
11953:848a522fd731 | 11954:b963ac00c967 |
---|---|
1367 return resolver; | 1367 return resolver; |
1368 end | 1368 end |
1369 | 1369 |
1370 function def_env.dns:lookup(name, typ, class) | 1370 function def_env.dns:lookup(name, typ, class) |
1371 local resolver = get_resolver(self.session); | 1371 local resolver = get_resolver(self.session); |
1372 local ret, err = async.wait_for(resolver:lookup_promise(name, typ, class)); | 1372 return resolver:lookup_promise(name, typ, class) |
1373 if ret then | |
1374 return true, ret; | |
1375 elseif err then | |
1376 return false, err; | |
1377 end | |
1378 end | 1373 end |
1379 | 1374 |
1380 function def_env.dns:addnameserver(...) | 1375 function def_env.dns:addnameserver(...) |
1381 local resolver = get_resolver(self.session); | 1376 local resolver = get_resolver(self.session); |
1382 resolver._resolver:addnameserver(...) | 1377 resolver._resolver:addnameserver(...) |