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

Commit 0fd64d7

Browse files
committed
rabbit_net: Ignore Dialyzer warnings in socket_ends() and unwrap_socket()
Those functions are currently looking into opaque types from `ranch_proxy_protocol`. Until this is fixed, we just ignore the warnings and comment out the specs. [#153850881]
1 parent 27a7bd3 commit 0fd64d7

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/rabbit_net.erl

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
{raw, non_neg_integer(), non_neg_integer(), binary()}].
4141
-type hostname() :: inet:hostname().
4242
-type ip_port() :: inet:port_number().
43-
-type host_or_ip() :: binary() | inet:ip_address().
43+
% -type host_or_ip() :: binary() | inet:ip_address().
4444
-spec is_ssl(socket()) -> boolean().
4545
-spec ssl_info(socket()) -> 'nossl' | ok_val_or_error([{atom(), any()}]).
4646
-spec controlling_process(socket(), pid()) -> ok_or_any_error().
@@ -75,11 +75,14 @@
7575
'nossl' | ok_val_or_error(rabbit_ssl:certificate()).
7676
-spec connection_string(socket(), 'inbound' | 'outbound') ->
7777
ok_val_or_error(string()).
78-
-spec socket_ends(socket(), 'inbound' | 'outbound') ->
79-
ok_val_or_error({host_or_ip(), ip_port(),
80-
host_or_ip(), ip_port()}).
78+
% -spec socket_ends(socket() | ranch_proxy:proxy_socket() | ranch_proxy_ssl:ssl_socket(),
79+
% 'inbound' | 'outbound') ->
80+
% ok_val_or_error({host_or_ip(), ip_port(),
81+
% host_or_ip(), ip_port()}).
8182
-spec is_loopback(socket() | inet:ip_address()) -> boolean().
82-
-spec unwrap_socket(socket() | ranch_proxy:proxy_socket() | ranch_proxy_ssl:ssl_socket()) -> socket().
83+
% -spec unwrap_socket(socket() | ranch_proxy:proxy_socket() | ranch_proxy_ssl:ssl_socket()) -> socket().
84+
85+
-dialyzer({nowarn_function, [socket_ends/2, unwrap_socket/1]}).
8386

8487
%%---------------------------------------------------------------------------
8588

0 commit comments

Comments
 (0)