Skip to content

Commit

Permalink
Fix Dialyzer warnings for OTP-26+
Browse files Browse the repository at this point in the history
  • Loading branch information
essen committed Apr 12, 2023
1 parent e943636 commit 706594d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PROJECT_REGISTERED = ranch_server
# Options.

CT_OPTS += -pa test -ct_hooks ranch_ct_hook [] # -boot start_sasl
PLT_APPS = crypto public_key tools
PLT_APPS = common_test crypto ct_helper public_key stampede tools

# Dependencies.

Expand Down
10 changes: 9 additions & 1 deletion src/ranch_proxy_header.erl
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,15 @@ v2_padding_test() ->
%% this only ends up returning the keys protocol, selected_cipher_suite
%% and sni_hostname *at most*.

-spec to_connection_info(proxy_info()) -> ssl:connection_info().
%% The type ssl:connection_info/0 is not exported. We just
%% replicate the relevant info tuples here.
-type ssl_connection_info() :: [
{sni_hostname, term()} |
{selected_cipher_suite, ssl:erl_cipher_suite()} |
{protocol, ssl:protocol_version()}
].

-spec to_connection_info(proxy_info()) -> ssl_connection_info().
to_connection_info(ProxyInfo=#{ssl := SSL}) ->
ConnInfo0 = case ProxyInfo of
#{authority := Authority} ->
Expand Down

0 comments on commit 706594d

Please sign in to comment.