fix(test): merge conflicts

This commit is contained in:
Shawn 2021-07-15 18:54:31 +08:00
parent ba166967c9
commit a1488b3946
2 changed files with 5 additions and 5 deletions

View File

@ -28,12 +28,12 @@
-spec(authenticate(emqx_types:clientinfo()) ->
ok | {ok, binary()} | {continue, map()} | {continue, binary(), map()} | {error, term()}).
authenticate(Credential = #{zone := Zone, listener := Listener}) ->
run_hooks('client.authenticate', [Credential], ok)
authenticate(Credential) ->
run_hooks('client.authenticate', [Credential], ok).
%% @doc Check ACL
-spec(authorize(emqx_types:clientinfo(), emqx_types:pubsub(), emqx_types:topic())
-> allow | deny).
-spec authorize(emqx_types:clientinfo(), emqx_types:pubsub(), emqx_types:topic())
-> allow | deny.
authorize(ClientInfo = #{zone := Zone, listener := Listener}, PubSub, Topic) ->
case emqx_acl_cache:is_enabled(Zone, Listener) of
true -> check_authorization_cache(ClientInfo, PubSub, Topic);

View File

@ -995,7 +995,7 @@ handle_info({sock_closed, Reason}, Channel = #channel{conn_state = connecting})
handle_info({sock_closed, Reason}, Channel =
#channel{conn_state = ConnState,
clientinfo = ClientInfo = #{zone := Zone listener := Listener}})
clientinfo = ClientInfo = #{zone := Zone, listener := Listener}})
when ConnState =:= connected orelse ConnState =:= reauthenticating ->
emqx_config:get_listener_conf(Zone, Listener, [flapping_detect, enable])
andalso emqx_flapping:detect(ClientInfo),