# HG changeset patch # User Kim Alvefur # Date 1538251356 -7200 # Node ID e2733f504d9e246b5fba93d92501c873cf84c087 # Parent f2d71e4284b75ce2abe9035e72876762ef897e34 net.resolvers.service: Early return on empty result set diff -r f2d71e4284b7 -r e2733f504d9e net/resolvers/service.lua --- 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;