fix(test): merge conflicts
This commit is contained in:
parent
ba166967c9
commit
a1488b3946
|
@ -28,12 +28,12 @@
|
||||||
|
|
||||||
-spec(authenticate(emqx_types:clientinfo()) ->
|
-spec(authenticate(emqx_types:clientinfo()) ->
|
||||||
ok | {ok, binary()} | {continue, map()} | {continue, binary(), map()} | {error, term()}).
|
ok | {ok, binary()} | {continue, map()} | {continue, binary(), map()} | {error, term()}).
|
||||||
authenticate(Credential = #{zone := Zone, listener := Listener}) ->
|
authenticate(Credential) ->
|
||||||
run_hooks('client.authenticate', [Credential], ok)
|
run_hooks('client.authenticate', [Credential], ok).
|
||||||
|
|
||||||
%% @doc Check ACL
|
%% @doc Check ACL
|
||||||
-spec(authorize(emqx_types:clientinfo(), emqx_types:pubsub(), emqx_types:topic())
|
-spec authorize(emqx_types:clientinfo(), emqx_types:pubsub(), emqx_types:topic())
|
||||||
-> allow | deny).
|
-> allow | deny.
|
||||||
authorize(ClientInfo = #{zone := Zone, listener := Listener}, PubSub, Topic) ->
|
authorize(ClientInfo = #{zone := Zone, listener := Listener}, PubSub, Topic) ->
|
||||||
case emqx_acl_cache:is_enabled(Zone, Listener) of
|
case emqx_acl_cache:is_enabled(Zone, Listener) of
|
||||||
true -> check_authorization_cache(ClientInfo, PubSub, Topic);
|
true -> check_authorization_cache(ClientInfo, PubSub, Topic);
|
||||||
|
|
|
@ -995,7 +995,7 @@ handle_info({sock_closed, Reason}, Channel = #channel{conn_state = connecting})
|
||||||
|
|
||||||
handle_info({sock_closed, Reason}, Channel =
|
handle_info({sock_closed, Reason}, Channel =
|
||||||
#channel{conn_state = ConnState,
|
#channel{conn_state = ConnState,
|
||||||
clientinfo = ClientInfo = #{zone := Zone listener := Listener}})
|
clientinfo = ClientInfo = #{zone := Zone, listener := Listener}})
|
||||||
when ConnState =:= connected orelse ConnState =:= reauthenticating ->
|
when ConnState =:= connected orelse ConnState =:= reauthenticating ->
|
||||||
emqx_config:get_listener_conf(Zone, Listener, [flapping_detect, enable])
|
emqx_config:get_listener_conf(Zone, Listener, [flapping_detect, enable])
|
||||||
andalso emqx_flapping:detect(ClientInfo),
|
andalso emqx_flapping:detect(ClientInfo),
|
||||||
|
|
Loading…
Reference in New Issue