summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Klishin <mklishin@pivotal.io>2017-02-20 23:57:51 +0300
committerMichael Klishin <mklishin@pivotal.io>2017-02-20 23:57:51 +0300
commit0f8d2c06aa7c9cb9ec7eb33c9547552679f2d095 (patch)
tree93a1e4f3ff5a2e24f909fffc0a35d9d42df230cf /src
parentd1a8ff8d28bfc66ddc512ae972d8f7d8daef47fd (diff)
downloadrabbitmq-server-git-0f8d2c06aa7c9cb9ec7eb33c9547552679f2d095.tar.gz
Prefer inet:gethostbyaddr/1 to inet_res:gethostbyaddr/1
The former is supposed to be the public API of the latter, see aweber/rabbitmq-autocluster#127. Fixes #1116.
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_peer_discovery_dns.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rabbit_peer_discovery_dns.erl b/src/rabbit_peer_discovery_dns.erl
index 554c914466..05102bebab 100644
--- a/src/rabbit_peer_discovery_dns.erl
+++ b/src/rabbit_peer_discovery_dns.erl
@@ -72,7 +72,7 @@ discover_hostnames(SeedHostname, LongNamesUsed) ->
IPs = inet_res:lookup(SeedHostname, in, a),
rabbit_log:info("Addresses discovered via A records of ~s: ~s",
[SeedHostname, string:join([inet_parse:ntoa(IP) || IP <- IPs], ", ")]),
- Hosts = [extract_host(inet_res:gethostbyaddr(A), LongNamesUsed, A) ||
+ Hosts = [extract_host(inet:gethostbyaddr(A), LongNamesUsed, A) ||
A <- IPs],
lists:filter(fun(E) -> E =/= error end, Hosts).