From: Evgeniy Khramtsov Date: Wed, 18 Jan 2017 14:54:42 +0000 (+0300) Subject: Don't attempt to resolve _jabber._tcp SRV record X-Git-Tag: 17.03-beta~91^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=60a09285b7f1c7b78768c794e55d79806d1abba9;p=ejabberd Don't attempt to resolve _jabber._tcp SRV record --- diff --git a/src/xmpp_stream_out.erl b/src/xmpp_stream_out.erl index 9ac4934dd..cd1524c12 100644 --- a/src/xmpp_stream_out.erl +++ b/src/xmpp_stream_out.erl @@ -852,16 +852,10 @@ srv_lookup(Host, Timeout, Retries) -> case inet_res:getbyname(SRVName, srv, Timeout) of {ok, HostEntry} -> host_entry_to_host_ports(HostEntry); - {error, _} -> - LegacySRVName = "_jabber._tcp." ++ Host, - case inet_res:getbyname(LegacySRVName, srv, Timeout) of - {error, timeout} -> - srv_lookup(Host, Timeout, Retries - 1); - {error, _} = Err -> - Err; - {ok, HostEntry} -> - host_entry_to_host_ports(HostEntry) - end + {error, timeout} -> + srv_lookup(Host, Timeout, Retries - 1); + {error, _} = Err -> + Err end. -spec a_lookup([{inet:hostname(), inet:port_number()}], state()) ->