diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2012-10-30 11:56:31 +0000 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2012-10-30 11:56:31 +0000 |
commit | a909713fc02ed762435de9cdc465ea9919b9928c (patch) | |
tree | fbfeffafe2a8c7b874f9b11ef8c117fb93b83c3b /src/rabbit_net.erl | |
parent | 67aaa1237373589da658bcb5c7f8bcb921fda663 (diff) | |
download | rabbitmq-server-a909713fc02ed762435de9cdc465ea9919b9928c.tar.gz |
Store name, host and peerhost as binary in the first place.
Diffstat (limited to 'src/rabbit_net.erl')
-rw-r--r-- | src/rabbit_net.erl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/rabbit_net.erl b/src/rabbit_net.erl index 24843aa0..c6fc9742 100644 --- a/src/rabbit_net.erl +++ b/src/rabbit_net.erl @@ -73,8 +73,8 @@ -spec(connection_string/2 :: (socket(), 'inbound' | 'outbound') -> ok_val_or_error(string())). -spec(rdns/2 :: - (socket(), 'inbound' | 'outbound') -> {string() | 'unknown', - string() | 'unknown'}). + (socket(), 'inbound' | 'outbound') -> {binary() | 'unknown', + binary() | 'unknown'}). -endif. @@ -223,7 +223,8 @@ rdns_lookup(Sock, Fun) -> {ok, Lookup} = application:get_env(rabbit, reverse_dns_lookups), case Lookup of true -> case Fun(Sock) of - {ok, {IP, _Port}} -> rabbit_networking:tcp_host(IP); + {ok, {IP, _Port}} -> list_to_binary( + rabbit_networking:tcp_host(IP)); _ -> unknown end; _ -> unknown |