Fix function clause introduced by c17ec50e3a

This commit is contained in:
Evgeniy Khramtsov 2017-09-28 12:24:24 +03:00
parent 3192687334
commit 2732c8f6fc
1 changed files with 3 additions and 3 deletions

View File

@ -867,16 +867,16 @@ resolve(Host, State) ->
-spec srv_lookup(string(), state()) -> {{ok, [host_port()]} | network_error(), boolean()}.
srv_lookup(_Host, #{xmlns := ?NS_COMPONENT}) ->
%% Do not attempt to lookup SRV for component connections
{error, nxdomain};
{{error, nxdomain}, false};
srv_lookup(Host, State) ->
%% Only perform SRV lookups for FQDN names
case string:chr(Host, $.) of
0 ->
{error, nxdomain};
{{error, nxdomain}, false};
_ ->
case inet:parse_address(Host) of
{ok, _} ->
{error, nxdomain};
{{error, nxdomain}, false};
{error, _} ->
Timeout = get_dns_timeout(State),
Retries = get_dns_retries(State),