Skip to content

Commit

Permalink
Silence dialyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
dsrosario committed Jul 30, 2024
1 parent e5284e2 commit 06c5d64
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
debug_info
]}.

{minimum_otp_vsn, "19"}.
{minimum_otp_vsn, "24"}.

%% == Dependencies ==

Expand Down
1 change: 1 addition & 0 deletions src/apns.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
{applications, [
kernel,
stdlib,
ssl,
jsx,
gun,
base64url
Expand Down
14 changes: 6 additions & 8 deletions src/apns_connection.erl
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,9 @@ proxy_connect_to_origin(internal, on_connect, StateData) ->
Host = host(Connection),
Port = port(Connection),
TlsOpts = tls_opts(Connection),
Http2Opts = http2_opts(),
Destination0 = #{ host => Host
, port => Port
, protocol => http2
, http2_opts => Http2Opts
, protocols => [http2]
, transport => tls
, tls_opts => TlsOpts
},
Expand Down Expand Up @@ -423,7 +421,7 @@ connected( info
%% answering with error, remove entry
#{gun_streams := Streams0} = StateData0,
case maps:get(StreamRef, Streams0, null) of
null ->
null ->
%% nothing todo
{keep_state, StateData0};
StreamData ->
Expand Down Expand Up @@ -453,12 +451,12 @@ connected( info
gun:cancel(GunPid, StreamRef),
{keep_state, StateData0#{gun_streams => Streams1}};
error ->
%% cant find stream data by stream ref?
%% cant find stream data by stream ref?
%% may be just answered and removed,
%% ignoring
{keep_state, StateData0}
end;
connected(info,
connected(info,
{timeout, _GunPid, _StreamRef},
StateData0) ->
%% timeout from different connection?
Expand Down Expand Up @@ -594,7 +592,7 @@ tls_opts(Connection) ->
, {keyfile, Keyfile}
, {verify, verify_peer} ];
token ->
[ {verify, verify_none} ]
[ {verify, verify_none} ]
end.

http2_opts() ->
Expand Down Expand Up @@ -661,7 +659,7 @@ backoff(N, Ceiling) ->
%%%===================================================================
-spec reply_errors_and_cancel_timers(map(), term()) -> ok.
reply_errors_and_cancel_timers(Streams, Reason) ->
[reply_error_and_cancel_timer(From, Reason, Tmr) ||
[reply_error_and_cancel_timer(From, Reason, Tmr) ||
#{from := From, timer := Tmr} <- maps:values(Streams)],
ok.

Expand Down
2 changes: 1 addition & 1 deletion src/apns_feedback.erl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
-export_type([feedback/0, feedback_config/0]).

-type feedback() :: {calendar:datetime(), string()}.
-type socket() :: gen_tcp:socket().
-type socket() :: ssl:sslsocket().
-type feedback_config() :: #{ host := string()
, port := pos_integer()
, certfile := string()
Expand Down

0 comments on commit 06c5d64

Please sign in to comment.