chore: fix dialyzer warnings

This commit is contained in:
JianBo He 2023-11-07 09:04:50 +08:00
parent 0d9e0bd3fe
commit 4ef156d69e
1 changed files with 4 additions and 3 deletions

View File

@ -86,7 +86,7 @@
| {event, conn_state() | updated} | {event, conn_state() | updated}
| {close, Reason :: atom()}. | {close, Reason :: atom()}.
-type replies() :: emqx_ocpp_frame:frame() | reply() | [reply()]. -type replies() :: reply() | [reply()].
-define(TIMER_TABLE, #{ -define(TIMER_TABLE, #{
alive_timer => keepalive alive_timer => keepalive
@ -203,7 +203,7 @@ stats(#channel{mqueue = MQueue}) ->
%% Init the channel %% Init the channel
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
-spec init(emqx_types:conninfo(), proplists:proplist()) -> channel(). -spec init(emqx_types:conninfo(), map()) -> channel().
init( init(
ConnInfo = #{ ConnInfo = #{
peername := {PeerHost, _Port}, peername := {PeerHost, _Port},
@ -554,13 +554,14 @@ handle_call(Req, From, Channel) ->
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
%% Handle Cast %% Handle Cast
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
-spec handle_cast(Req :: any(), channel()) -> -spec handle_cast(Req :: any(), channel()) ->
ok ok
| {ok, channel()} | {ok, channel()}
| {shutdown, Reason :: term(), channel()}. | {shutdown, Reason :: term(), channel()}.
handle_cast(Req, Channel) -> handle_cast(Req, Channel) ->
?SLOG(error, #{msg => "unexpected_cast", req => Req}), ?SLOG(error, #{msg => "unexpected_cast", req => Req}),
{noreply, Channel}. {ok, Channel}.
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
%% Handle Info %% Handle Info