From 4ef156d69eda1be4a262a1eae8bb595256960aad Mon Sep 17 00:00:00 2001 From: JianBo He Date: Tue, 7 Nov 2023 09:04:50 +0800 Subject: [PATCH] chore: fix dialyzer warnings --- apps/emqx_gateway_ocpp/src/emqx_ocpp_channel.erl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/emqx_gateway_ocpp/src/emqx_ocpp_channel.erl b/apps/emqx_gateway_ocpp/src/emqx_ocpp_channel.erl index 30b1cab3c..9fc3b8e0f 100644 --- a/apps/emqx_gateway_ocpp/src/emqx_ocpp_channel.erl +++ b/apps/emqx_gateway_ocpp/src/emqx_ocpp_channel.erl @@ -86,7 +86,7 @@ | {event, conn_state() | updated} | {close, Reason :: atom()}. --type replies() :: emqx_ocpp_frame:frame() | reply() | [reply()]. +-type replies() :: reply() | [reply()]. -define(TIMER_TABLE, #{ alive_timer => keepalive @@ -203,7 +203,7 @@ stats(#channel{mqueue = MQueue}) -> %% Init the channel %%-------------------------------------------------------------------- --spec init(emqx_types:conninfo(), proplists:proplist()) -> channel(). +-spec init(emqx_types:conninfo(), map()) -> channel(). init( ConnInfo = #{ peername := {PeerHost, _Port}, @@ -554,13 +554,14 @@ handle_call(Req, From, Channel) -> %%-------------------------------------------------------------------- %% Handle Cast %%-------------------------------------------------------------------- + -spec handle_cast(Req :: any(), channel()) -> ok | {ok, channel()} | {shutdown, Reason :: term(), channel()}. handle_cast(Req, Channel) -> ?SLOG(error, #{msg => "unexpected_cast", req => Req}), - {noreply, Channel}. + {ok, Channel}. %%-------------------------------------------------------------------- %% Handle Info