Software /
code /
prosody
Changeset
9393:e2733f504d9e
net.resolvers.service: Early return on empty result set
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 29 Sep 2018 22:02:36 +0200 |
parents | 9392:f2d71e4284b7 |
children | 9394:bcd94cc355d3 |
files | net/resolvers/service.lua |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/net/resolvers/service.lua Sat Sep 29 21:56:47 2018 +0200 +++ b/net/resolvers/service.lua Sat Sep 29 22:02:36 2018 +0200 @@ -34,6 +34,11 @@ local dns_resolver = adns.resolver(); dns_resolver:lookup(function (answer) if answer then + if #answer == 0 then + ready(); + return; + end + if #answer == 1 and answer[1].srv.target == "." then -- No service here ready(); return;