mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Fix function clause introduced by c17ec50e3a
This commit is contained in:
parent
3192687334
commit
2732c8f6fc
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user