diff --git a/doc/guide.html b/doc/guide.html index b4922a24c..0acf8f5c6 100644 --- a/doc/guide.html +++ b/doc/guide.html @@ -782,6 +782,10 @@ Full path to the file containing the SSL certificate for a specific domain. Specify which address families to try, in what order, and connect timeout in milliseconds. By default it first tries connecting with IPv4, if that fails it tries using IPv6, with a timeout of 10000 milliseconds. +
{s2s_dns_options, [{Property, Value}]}
+Define properties to use for DNS resolving. +Allowed Properties are: timeout in seconds which default value is 10 +and retries which default value is 2.
{s2s_default_policy, allow|deny}
The default policy for incoming and outgoing s2s connections to other Jabber servers. The default value is allow. diff --git a/doc/guide.tex b/doc/guide.tex index ed38ca9c0..fbd4d0c49 100644 --- a/doc/guide.tex +++ b/doc/guide.tex @@ -917,6 +917,10 @@ There are some additional global options that can be specified in the ejabberd c Specify which address families to try, in what order, and connect timeout in milliseconds. By default it first tries connecting with IPv4, if that fails it tries using IPv6, with a timeout of 10000 milliseconds. + \titem{\{s2s\_dns\_options, [\{Property, Value\}]\}} + \ind{options!s2s\_dns\_options}Define properties to use for DNS resolving. + Allowed Properties are: \term{timeout} in seconds which default value is \term{10} + and \term{retries} which default value is \term{2}. \titem{\{s2s\_default\_policy, allow|deny\}} The default policy for incoming and outgoing s2s connections to other Jabber servers. The default value is \term{allow}. diff --git a/src/ejabberd_s2s_out.erl b/src/ejabberd_s2s_out.erl index 51295443d..2f0501425 100644 --- a/src/ejabberd_s2s_out.erl +++ b/src/ejabberd_s2s_out.erl @@ -990,9 +990,9 @@ srv_lookup(Server) -> L when is_list(L) -> L; _ -> [] end, - Timeout = proplists:get_value(timeout, Options, timer:seconds(10)), + TimeoutMs = timer:seconds(proplists:get_value(timeout, Options, 10)), Retries = proplists:get_value(retries, Options, 2), - srv_lookup(Server, Timeout, Retries). + srv_lookup(Server, TimeoutMs, Retries). %% XXX - this behaviour is suboptimal in the case that the domain %% has a "_xmpp-server._tcp." but not a "_jabber._tcp." record and