chore(gw): fix dialyzer warnings
This commit is contained in:
parent
fd12a7ac9c
commit
dc05cdc586
|
@ -117,7 +117,7 @@ clients_insta(delete, #{ bindings := #{name := GwName0,
|
|||
}) ->
|
||||
GwName = binary_to_existing_atom(GwName0),
|
||||
ClientId = emqx_mgmt_util:urldecode(ClientId0),
|
||||
emqx_gateway_http:kickout_client(GwName, ClientId),
|
||||
_ = emqx_gateway_http:kickout_client(GwName, ClientId),
|
||||
{200}.
|
||||
|
||||
%% FIXME:
|
||||
|
|
|
@ -101,7 +101,8 @@ listener_name(GwName, Type, LisName) ->
|
|||
%% Mgmt APIs - clients
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-spec lookup_client(gateway_name(), emqx_type:clientid(), function()) -> list().
|
||||
-spec lookup_client(gateway_name(),
|
||||
emqx_type:clientid(), {atom(), atom()}) -> list().
|
||||
lookup_client(GwName, ClientId, FormatFun) ->
|
||||
lists:append([lookup_client(Node, GwName, {clientid, ClientId}, FormatFun)
|
||||
|| Node <- ekka_mnesia:running_nodes()]).
|
||||
|
@ -185,7 +186,7 @@ with_channel(GwName, ClientId, Fun) ->
|
|||
%% Utils
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-spec return_http_error(integer(), binary()) -> binary().
|
||||
-spec return_http_error(integer(), binary()) -> {integer(), binary()}.
|
||||
return_http_error(Code, Msg) ->
|
||||
{Code, emqx_json:encode(
|
||||
#{code => codestr(Code),
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
-include_lib("emqx/include/emqx_mqtt.hrl").
|
||||
-include_lib("emqx/include/logger.hrl").
|
||||
|
||||
|
||||
%% API
|
||||
-export([ info/1
|
||||
, info/2
|
||||
|
@ -1108,6 +1107,9 @@ handle_call({subscribe, _Topic, _Subopts}, Channel) ->
|
|||
handle_call({unsubscribe, _Topic}, Channel) ->
|
||||
reply({error, not_supported_now}, Channel);
|
||||
|
||||
handle_call(subscriptions, Channel) ->
|
||||
reply({error, not_supported_now}, Channel);
|
||||
|
||||
handle_call(kick, Channel) ->
|
||||
NChannel = ensure_disconnected(kicked, Channel),
|
||||
shutdown_and_reply(kicked, ok, NChannel);
|
||||
|
|
Loading…
Reference in New Issue