Skip to content
This repository was archived by the owner on Nov 17, 2020. It is now read-only.

Commit 0c50525

Browse files
Support rabbit_proxy_socket tuples in rabbit_net:getstat/2
References #279.
1 parent 144bbb6 commit 0c50525

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/rabbit_net.erl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ controlling_process(Sock, Pid) when is_port(Sock) ->
115115
getstat(Sock, Stats) when ?IS_SSL(Sock) ->
116116
inet:getstat(ssl_get_socket(Sock), Stats);
117117
getstat(Sock, Stats) when is_port(Sock) ->
118+
inet:getstat(Sock, Stats);
119+
%% Used by Proxy protocol support in plugins
120+
getstat({rabbit_proxy_socket, Sock, _}, Stats) when ?IS_SSL(Sock) ->
121+
inet:getstat(ssl_get_socket(Sock), Stats);
122+
getstat({rabbit_proxy_socket, Sock, _}, Stats) when is_port(Sock) ->
118123
inet:getstat(Sock, Stats).
119124

120125
recv(Sock) when ?IS_SSL(Sock) ->

0 commit comments

Comments
 (0)