Skip to content

Commit

Permalink
chore: tmp fix dialyzer otp26
Browse files Browse the repository at this point in the history
  • Loading branch information
qzhuyan committed Nov 30, 2023
1 parent eeacbac commit be9df94
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
7 changes: 7 additions & 0 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,10 @@
{main, "README.md"},
{source_url, "https://github.com/emqx/quic"}
]}.

{dialyzer, [
{warnings, [unmatched_returns, error_handling, no_unknown]},
{plt_apps, all_apps},
{statistics, true}
]
}.
2 changes: 1 addition & 1 deletion src/quicer.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ handoff_stream(Stream, NewOwner, HandoffData) ->
ActiveN =/= false andalso quicer:setopt(Stream, active, false),
Res = case forward_stream_msgs(Stream, NewOwner) of
ok ->
quicer:controlling_process(Stream, NewOwner),
_ = quicer:controlling_process(Stream, NewOwner),
NewOwner ! {handoff_done, Stream, HandoffData},
ok;
{error, _} = Other ->
Expand Down
2 changes: 1 addition & 1 deletion src/quicer_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
]).

start(_StartType, _StartArgs) ->
quicer:open_lib(),
_ = quicer:open_lib(),
_ = quicer:reg_open(application:get_env(quicer, profile, quic_execution_profile_low_latency)),
quicer_sup:start_link().

Expand Down
4 changes: 2 additions & 2 deletions src/quicer_listener.erl
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ init([Name, ListenOn, { #{conn_acceptors := N, alpn := Alpn} = LOpts,
process_flag(trap_exit, true),
{ok, L} = quicer:listen(ListenOn, maps:without([conn_acceptors], LOpts)),
{ok, ConnSup} = supervisor:start_link(quicer_conn_acceptor_sup, [L, Opts]),
[{ok, _} = supervisor:start_child(ConnSup, [ConnSup]) || _ <- lists:seq(1, N)],
_ = [{ok, _} = supervisor:start_child(ConnSup, [ConnSup]) || _ <- lists:seq(1, N)],
{ok, #state{ name = Name
, listener = L
, conn_sup = ConnSup
Expand Down Expand Up @@ -156,5 +156,5 @@ handle_info(_Info, State) ->
State :: term()) -> any().
terminate(_Reason, #state{listener = L}) ->
%% nif listener has no owner process so we need to close it explicitly.
quicer:close_listener(L),
_ = quicer:close_listener(L),
ok.
2 changes: 1 addition & 1 deletion src/quicer_listener_sup.erl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ start_listener(AppName, Port, Options) ->
supervisor:start_child(?MODULE, chid_spec(AppName, Port, Options)).

stop_listener(AppName) ->
supervisor:terminate_child(?MODULE, ?CHILD_ID(AppName)),
_ = supervisor:terminate_child(?MODULE, ?CHILD_ID(AppName)),
supervisor:delete_child(?MODULE, ?CHILD_ID(AppName)).

-spec listeners() -> [{{atom(), integer()|string()}, pid()}].
Expand Down
2 changes: 1 addition & 1 deletion src/quicer_server_conn_callback.erl
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ peer_needs_streams(_C, _UnidiOrBidi, S) ->
connected(Conn, _Flags, #{ slow_start := false, stream_opts := SOpts
, stream_callback := Callback} = S) ->
%% @TODO configurable behavior of spawing stream acceptor
quicer_stream:start_link(Callback, Conn, SOpts),
_ = quicer_stream:start_link(Callback, Conn, SOpts),
{ok, S#{conn => Conn}};
connected(_Connecion, _Flags, S) ->
{ok, S}.
Expand Down

0 comments on commit be9df94

Please sign in to comment.